Package-level declarations

Functions

Link copied to clipboard
fun InputStream.asInput(pool: <Error class: unknown class><<Error class: unknown class>> = ChunkBuffer.Pool): <Error class: unknown class>
Link copied to clipboard
fun OutputStream.asOutput(): <Error class: unknown class>
Link copied to clipboard
fun <Error class: unknown class>.inputStream(): InputStream

Creates InputStream adapter to the packet

Link copied to clipboard
fun <Error class: unknown class>.outputStream(): OutputStream

Creates OutputStream adapter to the builder

Link copied to clipboard
fun <Error class: unknown class>.readerUTF8(): Reader

Creates Reader from the byte packet that decodes UTF-8 characters

Link copied to clipboard
fun InputStream.readPacketAtLeast(n: Long): <Error class: unknown class>

Read a packet of at least n bytes or all remaining. Does fail if not enough bytes remaining.

Link copied to clipboard
fun InputStream.readPacketAtMost(n: Long): <Error class: unknown class>

Read a packet of at most n bytes. Resulting packet could be empty however this function always reads as much bytes as possible.

Link copied to clipboard
fun InputStream.readPacketExact(n: Long): <Error class: unknown class>

Read a packet of exactly n bytes

Link copied to clipboard
fun OutputStream.writePacket(packet: <Error class: unknown class>)

Write the whole packet to the stream

fun OutputStream.writePacket(builder: <Error class: unknown class>.() -> Unit)

Write the whole packet to the stream once it is built via builder lambda

Link copied to clipboard
fun <Error class: unknown class>.writerUTF8(): Writer

Creates Writer that encodes all characters in UTF-8 encoding