TerminalHostOutput

Host-bound byte sink used by terminal input encoders.

Implementations typically forward bytes to PTY stdin or another process input stream. All methods are synchronous from the caller's perspective: when a method returns, the provided data has either been consumed or copied.

Ordering across different terminal-to-host producers is the responsibility of the caller. A terminal host should serialize UI input reports (keyboard, mouse, paste, focus) and parser/core responses (DSR, CPR, DA, and future OSC/DCS replies) through one terminal event loop or actor before writing to this sink. Concurrent calls from independent threads have no ordering guarantee unless the implementation explicitly provides one.

Functions

Link copied to clipboard
abstract fun writeAscii(text: String)

Writes an ASCII string to the host input stream.

Link copied to clipboard
abstract fun writeByte(byte: Int)

Writes one unsigned byte value to the host input stream.

Link copied to clipboard
abstract fun writeBytes(bytes: ByteArray, offset: Int, length: Int)

Writes a contiguous byte range to the host input stream.

Link copied to clipboard
abstract fun writeUtf8(text: String)

Writes a Unicode string encoded as UTF-8 to the host input stream.