ByteReadChannel
Channel for asynchronous reading of sequences of bytes. This is a single-reader channel.
Operations on this channel cannot be invoked concurrently.
Inheritors
Properties
Functions
Suspend the channel until it has min bytes or gets closed. Throws exception if the channel was closed with an error. If there are bytes available in the channel, this function returns immediately.
Suspends the channel until it is exhausted or gets closed. If the read buffer is empty, it suspends until there are bytes available in the channel. Once the channel is exhausted or closed, this function returns.
Retrieves, but does not consume, up to the specified number of bytes from the current position in this ByteReadChannel.
Invokes block if it is possible to read at least min byte providing buffer to it so lambda can read from the buffer up to Buffer.readRemaining bytes. If there are no min bytes available then the invocation returns -1.
Reads all available bytes to dst buffer and returns immediately or suspends if no bytes available
Reads all available bytes to dst buffer and returns immediately or suspends if no bytes available
Reads a packet of packet bytes from the channel.
Reads bytes from the ByteReadChannel until a specified sequence of bytes is encountered or the specified limit is reached.
Reads a line of UTF-8 characters from the ByteReadChannel
. It recognizes CR, LF and CRLF as line delimiters.
Reads a line of UTF-8 characters to the specified out buffer. It recognizes CR, LF and CRLF as a line delimiter.
Skips the specified byteString in the ByteReadChannel if it is found at the current position.