Roman Elizarov | 1f74a2d | 2018-06-29 19:19:45 +0300 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. |
| 3 | */ |
| 4 | |
Sergey Mashkov | 6ca9a27 | 2017-07-25 20:10:27 +0300 | [diff] [blame] | 5 | package kotlinx.coroutines.experimental.io.packet |
| 6 | |
Sergey Mashkov | f34175e | 2017-09-06 22:10:34 +0300 | [diff] [blame] | 7 | import kotlinx.coroutines.experimental.io.internal.* |
Sergey Mashkov | 6d05993 | 2017-10-06 18:46:23 +0300 | [diff] [blame] | 8 | import kotlinx.io.core.* |
| 9 | import kotlinx.io.pool.* |
Sergey Mashkov | 6ca9a27 | 2017-07-25 20:10:27 +0300 | [diff] [blame] | 10 | |
Sergey Mashkov | 5feaf69 | 2017-09-06 21:50:51 +0300 | [diff] [blame] | 11 | internal val PACKET_BUFFER_SIZE = getIOIntProperty("PacketBufferSize", 4096) |
Sergey Mashkov | 5428565 | 2017-09-28 16:55:10 +0300 | [diff] [blame] | 12 | internal val PACKET_BUFFER_POOL_SIZE = getIOIntProperty("PacketBufferPoolSize", 128) |
Sergey Mashkov | 57906eb | 2017-09-19 14:08:06 +0300 | [diff] [blame] | 13 | internal val PACKET_MAX_COPY_SIZE = getIOIntProperty("PacketMaxCopySize", 500) |
Roman Elizarov | 8376203 | 2017-08-08 19:58:40 +0300 | [diff] [blame] | 14 | |
Sergey Mashkov | 6d05993 | 2017-10-06 18:46:23 +0300 | [diff] [blame] | 15 | fun WritePacket(headerSizeHint: Int = 0): ByteWritePacket = BytePacketBuilder(headerSizeHint) |