# libtmux::Server

- **Module:** libtmux
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/server.hpp#L346
- **Page:** https://libtmux.org/reference/cxx/libtmux-server/

## Members

- `at_socket_path` (method) — `-S path`: the socket file, used verbatim.
- `at_socket_name` (method) — `-L name`: resolved under tmux's socket directory, as the tmux flag does.
- `from_env` (method) — The server this process is running inside.
- `at_default` (method) — The server tmux would talk to with no `-L` or `-S` at all, which is the one a person means when they say "my tmux".
- `capabilities` (method) — The local backend contract; no command runs.
- `run` (method) — Run one command and return its standard output.
- `try_submit` (method) — Admit one command to an explicit bounded runtime without waiting for it.
- `run_batch` (method) — Run several commands in one invocation.
- `run_chain` (method) — Run a chain.
- `control` (method) — Open a control-mode connection to one session.
- `control_with_options` (method) — The Server supplies the socket and `session` supplies the session name; every other connection option is kept, including pane output policy.
- `tmux_version` (method) — Ask the selected subprocess executable with `tmux -V` without touching a server.
- `is_alive` (method) — Whether a server is answering on this socket.
- `check_alive` (method) — The same question, keeping why the answer was no.
- `kill` (method) — End the server and everything in it.
- `sessions` (method) — One snapshot each.
- `windows` (method) — tmux scopes window and pane listings to the current session unless asked for every one, so `-a` is part of the request rather than a caller's responsibility to remember.
- `panes` (method)
- `clients` (method)
- `wait_for` (method) — Block until someone signals this channel, or the deadline passes.
- `signal` (method) — Release whoever is waiting on the channel, or latch it for whoever waits next.
- `commands` (method) — Every command this tmux understands, with its alias and usage.
- `buffers` (method) — The server's cut buffers, newest first as tmux orders them.
- `load_buffer` (method) — Read a file into a named buffer, and write one back out.
- `save_buffer` (method)
- `bind_key` (method) — Bind a key in a key table, and take a binding away again.
- `unbind_key` (method) — Unbinding a key that was not bound succeeds; unbinding in a table that does not exist is refused.
- `run_shell` (method) — Run a shell command on the machine the server is on.
- `source_file` (method) — Run the commands in a file, the way tmux runs a configuration file.
- `check_file` (method) — Parse the same file and report what tmux would refuse in it, running none of it.
- `expand` (method) — Ask tmux to expand a format, against no target but the server itself.
- `show_message` (method) — Put a message on the status line of every attached client, and send it to each control client as `message`.
- `set_buffer` (method) — Put text in a named buffer, replacing what was there.
- `session` (method) — One object by target, for a caller holding an id or a `session:window` path that came from somewhere else.
- `window` (method)
- `pane` (method)
- `new_session` (method) — Created detached, and returned, because tmux prints what it made.
- `options` (method)
- `server_options` (method) — The server's own options, which are neither session nor window options and are the only ones a server without a session still has.
- `set_server_option` (method)
- `global_options` (method)
- `set_global_option` (method) — Sets the value every session inherits, rather than one session's own.
- `hooks` (method)
- `global_hooks` (method) — A hook set globally is not reported by the unscoped listing, so reading it back needs the scope it was set with.
- `set_global_hook` (method)
