# ControlSession

- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/ControlSession.swift#L95
- **Page:** https://libtmux.org/en/swift/latest/reference/controlsession/

A live control-mode connection.

Commands go in and numbered replies come back, so output belongs to the
command that produced it — the attribution a `;` list cannot give. Anything
the server volunteers meanwhile arrives on ``notifications``.

## Members

- `preconditionIsolated(_:file:line:)` (method): Stops program execution if the current task is not executing on this actor's serial executor.
- `assertIsolated(_:file:line:)` (method): Stops program execution if the current task is not executing on this actor's serial executor.
- `assumeIsolated(_:file:line:)` (method): Assume that the current task is executing on this actor's serial executor, or stop program execution otherwise.
- `notifications` (property): Everything the server volunteered: `%output`, `%window-add`, and the rest.
- `send(_:)` (method): Sends a command and waits for the block tmux brackets its reply with.
- `watch(_:)` (method): Registers a format subscription on this connection.
- `stopWatching(_:)` (method): Removes the subscription registered under `name`.
- `changes(named:)` (method): Every subscription change on this connection, optionally narrowed to one subscription's name.
