# LibTmux.ControlModeSubscriptions.SubscribeSessionAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/ControlMode/ControlModeSubscriptions.cs#L28
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-controlmodesubscriptions-subscribesessionasync/

```
LibTmux.ControlModeSubscriptions.SubscribeSessionAsync(session: IControlModeSession, name: string, format: string, cancellationToken: CancellationToken) -> Task<IReadOnlyList<string>>
```

Subscribes to a session-scoped format changing.

## Parameters

- `session` (`IControlModeSession`): The control client to subscribe on.
- `name` (`string`): The subscription's name, echoed back as the first word of a
<c>%subscription-changed</c> notification for it.
- `format` (`string`): The tmux format to watch, without <c>#{}</c>.
- `cancellationToken` (`CancellationToken`): Cancels the tmux command.

## Returns

The lines tmux printed answering the subscribe command.
