# LibTmux.Server.SwitchClientAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Server.Clients.cs#L115
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-server-switchclientasync/

tmux command: [`switch-client`](/en/tmux/latest/manual/switch-client/)

```
LibTmux.Server.SwitchClientAsync(targetSession: string, cancellationToken: CancellationToken) -> Task
```

Switches the caller's client to another session.

## Parameters

- `targetSession` (`string`): The session to switch to.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.
