# LibTmux::Control

- **Package:** LibTmux
- **Language:** Raku
- **Kind:** module
- **Source:** https://github.com/libtmux/libtmux-raku/blob/e76160bcce6e03976d49424da15b7c31afb2c68e/lib/LibTmux/Control.rakumod#L3
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-control/

# Control framing and delivery

Decoder frames bytes on LF and correlates all three numeric guard fields.
Notification-shaped lines within a response remain payload. PaneOutput keeps
octal-decoded bytes, including NUL and incomplete UTF-8; text decoding belongs
to a separate incremental consumer. UnknownEvent preserves future notifications.

The tmux wire protocol does not escape arbitrary command payloads from matching
their own terminal guard. Managed reads must use declared, prefixed projections;
raw command output cannot promise lossless framing for guard-shaped payloads.
A Response acknowledges dispatch. Its end guard does not establish completion
of a launched job, popup, detach, or other asynchronous effect.
Some queued jobs print outside response blocks. UnframedOutput preserves such
lines, but the protocol cannot distinguish arbitrary job text from notifications.

Event delivery is live, without replay. A late tap misses earlier events.
Each subscriber has an independently bounded queue and serial worker. A slow
subscriber overflows explicitly; a throwing callback terminates only its own
subscription. Closing a tap discards queued values. Owner completion drains
already accepted values before done; failure drains before quit. User callbacks
already executing cannot be cancelled, and owner teardown does not wait for them.

## Members

### Other members

- [`Connection`](/en/raku/latest/reference/libtmux-control-connection/) (class)
- [`Decoder`](/en/raku/latest/reference/libtmux-control-decoder/) (class): Incremental LF framing with exact response guards and bounded retained data.
- [`Event`](/en/raku/latest/reference/libtmux-control-event/) (class): One notification, retaining its original bytes without the record terminator.
- [`PaneOutput`](/en/raku/latest/reference/libtmux-control-paneoutput/) (class): Pane output is terminal bytes, not an independently decodable UTF-8 string.
- [`Response`](/en/raku/latest/reference/libtmux-control-response/) (class): A matched command guard pair acknowledges execution, not asynchronous effects.
- [`UnframedOutput`](/en/raku/latest/reference/libtmux-control-unframedoutput/) (class): Some queued jobs print after their end guard; preserve that unframed line.
- [`UnknownEvent`](/en/raku/latest/reference/libtmux-control-unknownevent/) (class): An unrecognized notification remains inspectable without interpreting its body.
