Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

struct libtmux-go latest

Connection

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. Destroying its initial session moves the clients to another session when one exists; the retained Session value keeps its original identity.

Source and package
Qualified name
tmux.Connection
Package
tmux
Distribution
github.com/libtmux/libtmux-go/tmux
Source
tmux/connection.go
struct tmux.Connection

Description#

It is what a record runs through. Server.OpenControl returns a ControlClient instead, one client carrying commands and notifications with no record bound to it.

Members6#

  • 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.
Esc

Type to search.

Reference previewOpen reference