# Client

- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Sources/LibTmux/Client.swift#L6
- **Page:** https://libtmux.org/reference/swift/client/

A client attached to a tmux server.

tmux targets a client by its current name or tty, not by `client_pid`. A
disconnect followed by name reuse can therefore make a held value name a
replacement within the same daemon. The process id remains useful metadata,
but it is not a stable client-target key.

## Members

- `!=(_:_:)` (function) — Returns a Boolean value indicating whether two values are not equal.
- `id` (property) — The client's name, which is its terminal path for an ordinary client.
- `incarnation` (property) — The daemon this value was read from.
- `name` (property) — tmux's name for the client, which for a terminal is the path of its tty. It is what a command targeting a client has to say.
- `tty` (property) — The terminal device behind the client, empty for one with no terminal.
- `processID` (property) — The client process, which is not the server: killing it detaches rather than shutting anything down.
- `width` (property) — The terminal's width in cells, absent for a client that has no terminal. tmux reports it as empty for a control-mode connection, so `nil` is what it said rather than a zero this library invented.
- `height` (property) — The terminal's height in cells, absent on the same terms as ``width``.
- `isControlMode` (property) — Whether this client is a control-mode connection rather than a terminal.
- `sessionID` (property) — The session the client is looking at. A client attaches to exactly one, and switching sessions changes this rather than making a new client.
- `init(name:tty:processID:width:height:isControlMode:sessionID:incarnation:)` (method)
- `init(from:)` (method) — Creates a new instance by decoding from the given decoder.
- `filterFieldType(_:)` (method) — The value kind an id names, or `nil` when this model does not know it.
- `filterFieldID(for:)` (method) — The stable wire id for a key path, or `nil` if the property is not filterable.
- `filterValue(_:of:)` (method) — Reads the field an id names, or `nil` if this model has no such field.
