readPacket

suspend fun ByteReadChannel.readPacket(packet: Int): Source(source)

Reads a packet of packet bytes from the channel.

Report a problem

Throws

EOFException

if the channel is closed before the packet is fully read.