# LibTmux.detach_client

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** Julia
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/topology.jl#L327
- **Page:** https://libtmux.org/en/julia/latest/reference/libtmux-detach_client/

```
detach_client(
    connection::LibTmux.ControlConnection,
    client::LibTmux.ClientRef;
    kwargs...
)

detach_client(server::LibTmux.Server, client::LibTmux.ClientRef; kwargs...)
```

## Methods

### `detach_client` (overload 1)

```julia
detach_client(
    connection::LibTmux.ControlConnection,
    client::LibTmux.ClientRef;
    kwargs...
)
```

[Source](https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/control_clients.jl#L71).

Detach the captured client after checking its observed incarnation. No parent signal or shell command is sent. Client validation and observational race semantics match `switch_client`. Return `ControlResult` after the completion fence. Detaching a client that carries this connection can close it before the fence and raise an uncertain-effect error; no reconnect or fallback occurs.

```julia
detach_client(connection::ControlConnection, client::ClientRef; kwargs...)
```

### `detach_client(server::LibTmux.Server, client::LibTmux.ClientRef; kwargs...)`

[Source](https://github.com/libtmux/libtmux-julia/blob/f3da513be1225d36d5854cd8db5972c01857578e/src/topology.jl#L334).

Detach only the captured client after checking its observed incarnation. No parent signal or shell command is sent. Return the command result; generation and incarnation checks are best effort.

```julia
detach_client(server, client::ClientRef; kwargs...)
```

## Parameters

- `connection` (`LibTmux.ControlConnection`) (for `detach_client(connection, client, kwargs)`)
- `client` (`LibTmux.ClientRef`)
- `kwargs`
- `server` (`LibTmux.Server`) (for `detach_client(server, client, kwargs)`)
