interface AsyncByteSink
source · line 22public
public interface AsyncByteSink
A suspending byte sink accepting short writes and an explicit flush operation.
Extensions
public suspend fun AsyncByteSink.queue(vararg commands: Command): Unit· scoop:scoop.terminal.asyncio:0.1.0public suspend fun AsyncByteSink.writeFully(buffer: NativeByteBuffer, count: Long = buffer.readableBytes): Unit· scoop:scoop.asyncio:0.1.0public suspend fun AsyncByteSink.writeFrom(buffer: NativeByteBuffer): Long· scoop:scoop.asyncio:0.1.0public suspend fun AsyncByteSink.execute(vararg commands: Command): Unit· scoop:scoop.terminal.asyncio:0.1.0
function writeFrom
source · line 27public
public suspend fun writeFrom(buffer: NativeByteBuffer, count: Long): Long
Consumes at most count readable bytes, advances the read position, and returns the accepted count.
parameter count
source · line 27public
count: Long
parameter buffer
source · line 27public
buffer: NativeByteBuffer
function flush
source · line 31public
public suspend fun flush(): Unit
Waits for accepted buffered output to reach the underlying sink's flush boundary.