ByteStreamSender

class ByteStreamSender(val info: ByteStreamInfo, destination: StreamDestination<ByteArray>) : BaseStreamSender<ByteArray>

Constructors

Link copied to clipboard
constructor(info: ByteStreamInfo, destination: StreamDestination<ByteArray>)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
suspend fun close(reason: String? = null)
Link copied to clipboard
suspend fun write(data: ByteArray): Result<Unit>

Write to the stream.

Link copied to clipboard

Reads the input stream and sends it to the data stream.

suspend fun ByteStreamSender.write(source: Source): Result<Unit>

Reads the source and sends it to the data stream.

Link copied to clipboard

Reads the file from filePath and writes it to the data stream.