On this page
tmux.Connection
- Module
- tmux
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/connection.go
-
Connection owns terminal control-mode transport to the exact daemon that materialized its session. Values obtained from Server or Session retain the connection. Closing is terminal: they neither reconnect nor fall back to a subprocess. Its lanes are attached tmux clients; closing the last client can trigger tmux's destroy-unattached or exit-unattached policy. On tmux 3.6 or later, destroying its initial session moves the clients to another session when one exists; the retained Session value keeps its original identity.
6 declared, 0 inherited
Members
- Call method Call executes one safely encoded tmux command on an owned lane and returns every reply frame in order. An alias may produce zero or multiple frames; a %error frame remains result data through
ControlCommandResult.Failed. Args always describe one command, so a bare semicolon is quoted as an operand rather than interpreted as a command-list separator. - Close method Close terminally closes every lane on bounded internal contexts. It is safe to call concurrently and more than once.
- CloseContext method CloseContext starts terminal shutdown and waits within ctx. The context bounds only the wait; a later call may resume waiting for the same shutdown.
- Lanes method Lanes reports the number of owned control-mode command lanes.
- Server method Server returns the ordinary server value bound to this connection.
- Session method Session returns the attached session value bound to this connection.