# LibTmux.Server.AttachSessionAsync

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

tmux command: [`attach-session`](/en/tmux/latest/manual/attach-session/)

```
LibTmux.Server.AttachSessionAsync(request: AttachSessionRequest, cancellationToken: CancellationToken) -> Task
```

Attaches a client to a session on this server.

## Parameters

- `request` (`AttachSessionRequest`): Attachment options naming the session.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.
