Package-level declarations
Types
Channel for asynchronous reading and writing of sequences of bytes. This is a buffered single-reader single-writer channel.
Sequential (non-concurrent) byte channel implementation
Channel for asynchronous reading of sequences of bytes. This is a single-reader channel.
Channel for asynchronous reading of sequences of bytes. This is a single-reader channel.
Channel for asynchronous reading of sequences of bytes. This is a single-reader channel.
Channel for asynchronous reading of sequences of bytes. This is a single-reader channel.
Channel for asynchronous writing of sequences of bytes. This is a single-writer channel.
Channel for asynchronous writing of sequences of bytes. This is a single-writer channel.
Channel for asynchronous writing of sequences of bytes. This is a single-writer channel.
Channel for asynchronous writing of sequences of bytes. This is a single-writer channel.
Indicates attempt to write on isClosedForWrite channel that was closed without a cause. A failed channel rethrows the original close cause exception on send attempts.
Visitor function that is invoked for every available buffer (or chunk) of a channel. The last parameter shows that the buffer is known to be the last.
API marked with this annotation is internal, and it is not intended to be used outside Ktor. It could be modified or removed without any notice. Using it outside Ktor could cause undefined behaviour and/or any unexpected effects.
A marker annotations for DSLs.
API marked with this annotation is experimental and is not guaranteed to be stable.
API marked with this annotation is intended to become public in the future version. Usually it means that the API can't be public at the moment of development due to compatibility guarantees restrictions.
Functions
Creates buffered channel for asynchronous reading and writing of sequences of bytes.
Creates buffered channel for asynchronous reading and writing of sequences of bytes.
Creates a buffered channel for asynchronous reading and writing of sequences of bytes.
Creates a buffered channel for asynchronous reading and writing of sequences of bytes using close function to close a channel.
Creates a buffered channel for asynchronous reading and writing of sequences of bytes.
Creates channel for reading from the specified byte array. Please note that it could use content directly or copy its bytes depending on the platform.
Creates channel for reading from the specified byte array. Please note that it could use content directly or copy its bytes depending on the platform
Creates channel for reading from the specified ArrayBufferView
Creates channel for reading from the specified byte array.
Creates a channel for reading from the specified byte buffer.
Creates a channel for reading from the specified byte array.
Creates channel for reading from the specified byte array.
Closes this channel with no failure (successfully)
For every available bytes range invokes visitor function until it return false or end of stream encountered. The provided buffer should be never captured outside of the visitor block otherwise resource leaks, crashes and data corruptions may occur. The visitor block may be invoked multiple times, once or never.
Discards all bytes in the channel and suspends until end of stream.
Discards exactly n bytes or fails if not enough bytes in the channel
Print exception stacktrace.
Print exception stacktrace.
Print exception stacktrace.
Print exception stacktrace.
Await until at least desiredSize is available for read or EOF and invoke block function. The block function should never capture a provided Memory instance outside otherwise an undefined behaviour may occur including accidental crash or data corruption. Block function should return number of bytes consumed or 0.
Reads all remaining bytes and makes a byte packet
Reads from the channel to the specified dst byte buffer until one of the following:
Await for desiredSpace will be available for write and invoke block function providing Memory instance and the corresponding range suitable for wiring in the memory. The block function should return number of bytes were written, possibly 0.
Writes UTF16 character