Package-level declarations

Functions

Link copied to clipboard
Link copied to clipboard
fun ByteReadPacket.readArrayBuffer(n: Int = remaining.coerceAtMostMaxIntOrFail("Unable to make a new ArrayBuffer: packet is too big")): ArrayBuffer

Read exactly n bytes to a new array buffer instance

Link copied to clipboard
fun ByteReadPacket.readText(encoding: String, max: Int = Int.MAX_VALUE): String
fun ByteReadPacket.readText(encoding: String = "UTF-8", out: Appendable, max: Int = Int.MAX_VALUE): Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun BytePacketBuilder.writeFully(src: ArrayBuffer, offset: Int = 0, length: Int = src.byteLength - offset)

Write exactly length bytes from the specified src array buffer

fun BytePacketBuilder.writeFully(src: Int8Array, offset: Int = 0, length: Int = src.length - offset)

Write exactly length bytes from the specified src typed array