Control.Connection
Source and package
- Qualified name
-
LibTmux:: Control:: Connection - Module
- LibTmux
- Declared in
Control- Package
- LibTmux
- Source
- lib/LibTmux/Control/Connection.rakumod
-
Description#
Owned control connection
Connection connects to an exact session on an observed daemon. Startup verifies the daemon again over the persistent connection. The ignore-size client flag avoids changing pane dimensions. New layouts are negotiated when supported; older profiles retain their native control layout representation.
Commands are serialized through one bounded queue. A separate unpredictable FORMAT barrier correlates every response, including nested commands and jobs which print after their end guard. A barrier means the tmux command queue reached that point; background jobs and external effects still need domain-specific completion evidence. Raw command output has the framing limitations described by
LibTmux::Control. Declared projections avoid arbitrary output delimiters.Each request owns a deadline from admission. Cancelling an unsent request leaves the connection usable. Timeout or cancellation after dispatch closes the whole connection because later response ownership is uncertain. Effects already sent remain indeterminate. Closing stops the client, not the daemon or launched jobs.
An event Supply is shared, live and bounded per subscriber. Reconnect requires a new Connection and explicit snapshot acquisition; old requests and observations never migrate automatically. Every connection has a distinct epoch.
Members34#
- Acknowledgement class Ordered command records observed before a separate queue barrier completed.
- cleanup-timeout-ms: Positive:D property Separate termination and reaping budget in milliseconds.
- clone method Refuse cloning of a process and its pending request state.
- close method Stop admission, settle every request and reap only this connection's client.
- close-async method Share one bounded shutdown which settles pending work and reaps only this client.
- closed method Shared completion Promise for connection shutdown; callers cannot resolve it.
- connect method Observe, attach and verify a persistent connection to an exact session ID.
- connect-async method Resolve to a verified connection or reject after bounded startup cleanup.
- endpoint: Endpoint:D property Captured connection settings; retaining them owns no process.
- epoch: Str:D property Unique connection identity; reconnecting always creates a new epoch.
- events method All taps share this process; each receives independently bounded live delivery.
- execute method Execute one raw command, waiting for a separate queue barrier; no rollback is implied.
- execute-async method Queue one command and resolve its ordered acknowledgement; cancellation may close the connection.
- explain method Explain a query against this connection's immutable negotiated capabilities, without I/O.
- explain-panes method Explain pane restrictions and local residual work.
- failure method Terminal connection error, or an undefined Exception after normal close.
- max-command-bytes: Positive:D property Maximum encoded command size in bytes, including tmux quoting.
- max-output-bytes: Positive:D property Per-response output-byte limit; retained stderr has the same separate bound.
- max-pending: Positive:D property Maximum admitted requests, including the active request and queued cancellations.
- new method Refuse unstarted owners; construct a live owner through connect.
- observation method Return the immutable identity and negotiated capabilities established at connection time.
- observe method Verify the connected daemon through a queue barrier without acquiring a graph.
- observe-async method Verify daemon identity through a queued barrier and resolve the captured observation.
- pid method Owned control-client PID, or undefined before successful process creation.
- query method Acquire a selection through this connection; retained observations keep no live owner.
- query-async method Copy and validate query data before scheduling acquisition and residual evaluation.
- query-panes method Acquire pane observations with explicit source filtering.
- read method Read a declared projection through the connection's negotiated codec profile.
- reaped method Whether the owned control client has exited and been joined.
- session-id: Session
Id :D property Session used for the initial attach; explicit client switching can later change it. - snapshot method Acquire a fresh graph through this connection; retained views keep no connection alive.
- snapshot-async method Resolve a fresh graph acquired within one deadline, with explicit cancellation.
- timeout-ms: Positive:D property Default request deadline budget in milliseconds from admission.
- validate-command method Validate an encoded command against this connection without I/O or queue admission.