# libtmux::test::ScopedTmuxServer

- **Module:** libtmux::test
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/testing/scoped_server.hpp#L117
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-test-scopedtmuxserver/

A tmux server that exists for the lifetime of this value.

Owns a private socket and directory and kills the server on destruction, so suites running at once cannot see each other's sessions. Teardown reports rather than throws — a destructor that throws during a failing test hides the failure.

## Members

- `start` (method)
- `~ScopedTmuxServer` (method)
- `ScopedTmuxServer` (method)
- `socket_mode` (method)
- `socket_name` (method)
- `socket_path` (method)
- `tmux_tmpdir` (method)
- `session_name` (method)
- `socket_namespace` (method)
- `server_pid` (method)
- `command_prefix` (method)
- `is_alive` (method)
- `child_environment` (method): `NAME=VALUE` entries for a child that should reach this server and not the surrounding one: `TMUX_TMPDIR` inside the private tree, `TMUX` and `TMUX_PANE` absent.
