LibTmux.Mcp.TmuxConnectionAccessor
.NET
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET
- C++ Unavailable
- Swift Unavailable
-
Holds the tmux servers this process talks to, one per socket.
A conversation outlives any single tool call, so connecting once and keeping the handle costs one process launch instead of one per call. Sockets are cached separately because a machine runs several tmux servers at once — a user's own, a test rig's, a sandbox's — and they are different servers with the same commands, not one server addressed two ways.
When no template is supplied, the tmux binary comes from
LIBTMUX_TMUX. An explicit template is already a pinned route and wins over later process-environment changes.
Members
- TmuxConnectionAccessor ( template : ServerConnectionOptions? , defaultSocketName : string? , logger : ILogger? ) ( server : Server )
-
Initializes the accessor.
- Parameters
-
-
server ( Server ) – The server every call reaches.
-
-
Gets the socket used when a call names none.
- GetAsync ( socketName : string? , cancellationToken : CancellationToken ) Task<Server>
-
Answers a server, connecting on the first ask for that socket.
- Parameters
-
-
socketName ( string? ) – The socket, or null for the configured default.
-
cancellationToken ( CancellationToken ) – Cancels the tmux command.
-
- Returns
-
The server.
- Raises
-
-
McpException – tmux could not be reached.
-
-
Forgets a cached server so the next call reconnects.
A materialized handle names one tmux <em>process</em>. Killing the server and starting another gives the same socket a different process, and the old handle then refuses to be used rather than quietly answering for a server that no longer exists.
- Parameters
-
-
socketName ( string? ) – The socket, or null for the configured default.
-