flush

suspend fun flush(timeout: Long)

Flushes the write channel.

This can be used to manually flush the channel if automatic flushing has been disabled.

ie. if write(ByteArray, Boolean, Long) has been called with the middle flush parameter set to false.

Parameters

timeout

Time in milliseconds after which the flush operation should be aborted if it still hasn't completed.

Throws

TimeoutCancellationException

if timeout is reached