# Client

- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-swift/blob/254f8b2be7eb60cacc3ffcb3ea8e456784f582df/Sources/LibTmux/Client.swift#L7
- **Page:** https://libtmux.org/en/swift/latest/reference/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.
- `filterFormatField(_:)` (method): No field lowers unless a model says so, so a conformance written before this existed keeps working and simply filters at home.
- `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.
- `activePaneID` (property): The pane selected by this client.
- `isWindowZoomed` (property): Whether the client's active window is zoomed.
- `init(name:tty:processID:width:height:isControlMode:sessionID:activePaneID:isWindowZoomed: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.
