RecvStreamInterface

The incoming half of a QUIC stream.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun bytesRead(): ULong

Total bytes read from this stream so far.

Link copied to clipboard
abstract suspend fun id(): String
Link copied to clipboard
abstract suspend fun read(sizeLimit: UInt): ByteArray

Read up to size_limit bytes into a fresh buffer.

Link copied to clipboard
abstract suspend fun readExact(size: UInt): ByteArray

Read exactly size bytes, erroring if the stream ends early.

Link copied to clipboard
abstract suspend fun readToEnd(sizeLimit: UInt): ByteArray

Read until end-of-stream, with size_limit as a maximum.

Link copied to clipboard
abstract suspend fun receivedReset(): ULong?
Link copied to clipboard
abstract suspend fun stop(errorCode: ULong)

Stop the incoming stream with an error code.