zt
writeShort
ephemient
writeShort(ushort.toShort())
UShort
Short
val readChannel = clientConnection.openReadChannel() val sendChannel = clientConnection.openWriteChannel(autoFlush = true) val authName = "" val authData = "" fun BytePacketBuilder.writePadding(bytes: Int) { repeat((4 - bytes % 4) % 4) { writeByte(0) } } sendChannel.writePacket { writeUByte(102u) writeUByte(0u) writeUShort(11u) writeUShort(0u) writeUShort(authName.length.toUShort()) writeUShort(authData.length.toUShort()) writeUShort(0u) writeText(authName) writePadding(authName.length) writeText(authData) writePadding(authData.length) } println(readChannel.readByte())
Uncaught Kotlin exception: <http://io.ktor.utils.io|io.ktor.utils.io>.errors.EOFException: 1 bytes required but EOF reached
A modern programming language that makes developers happier.