ktor-io / io.ktor.utils.io / ByteWriteChannel / flush

flush

abstract fun flush(): Unit

Flushes all pending write bytes making them available for read.

This function is thread-safe and can be invoked in any thread at any time. It does nothing when invoked on a closed channel.