readFrame

suspend fun ByteReadChannel.readFrame(maxFrameSize: Long, lastOpcode: Int): Frame

Reads bits from ByteReadChannel and converts into a WebSocket Frame.

Parameters

maxFrameSize

maximum frame size that could be read

lastOpcode

last read opcode