readFrame

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

Reads bits from ByteReadChannel and converts into Websocket Frame.

Parameters

maxFrameSize

maximum frame size that could be read

lastOpcode

last read opcode