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

Functions

Link copied to clipboard
suspend fun close(reason: String? = null)
Link copied to clipboard
suspend fun write(data: ByteArray)
Link copied to clipboard
suspend fun ByteStreamSender.write(input: InputStream)

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

suspend fun ByteStreamSender.write(source: Source)

Reads the source and sends it to the data stream.

Link copied to clipboard
suspend fun ByteStreamSender.writeFile(filePath: String)

Reads the file and writes it to the data stream.