write

abstract fun write(message: T)

Encode message to bytes and enqueue the bytes for delivery, waiting if necessary until the delivery channel has capacity for the encoded message.

Throws

if this stream is closed.