readRemaining

open suspend fun readRemaining(
    limit: Long,
    headerSizeHint: Int
): ByteReadPacket

Overrides ByteReadChannel.readRemaining

Reads up to limit bytes and makes a byte packet or until end of stream encountered. Accepts headerSizeHint to be provided, see BytePacketBuilder.