Skip to main content

Module client

Module client 

Source
Expand description

Blocking unix-socket client for the semantic side-channel.

Dormant rule. Without TERMWRIGHT_ENDPOINT and TERMWRIGHT_TOKEN in the environment Client::from_env returns None: the application opens no socket, writes no marker, and renders exactly the bytes it would have rendered anyway.

The client is deliberately blocking and single-threaded. A TUI renders on one thread and the marker must follow that render’s last byte, so Client::publish does its socket work inline and hands back the marker to write. Driver requests are picked up by Client::poll, which never blocks.

Structs§

Client
One semantic session: handshake, snapshot publishing, render markers.
Options
How a client identifies itself and what it can provide.

Constants§

DIAL_TIMEOUT
Default handshake budget.
ENV_ENDPOINT
Environment variable naming the driver’s socket.
ENV_PROTOCOL
Environment variable pinning the protocol version.
ENV_TOKEN
Environment variable carrying the per-launch session token.
WRITE_TIMEOUT
Default bound on a single frame write.