# LibTmux.PsmuxSession

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Psmux/PsmuxSession.cs#L11
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-psmuxsession/

An immutable observation of the sole psmux session.

This observation is bound to <see cref="Server" />'s captured generation.
Query methods throw <see cref="StaleServerGenerationException" /> after replacement;
call <see cref="PsmuxServer.RefreshAsync" /> to obtain a fresh observation.

## Members

### Collections and queries

- `GetWindowsAsync` (method): Reads the session's current windows.
- `GetPanesAsync` (method): Reads the session's current panes.

### Other members

- `Attached` (property): Gets whether a client was attached when the session was read.
- `Id` (property): Gets the captured session identifier.
- `Name` (property): Gets the captured session name.
- `Server` (property): Gets the psmux endpoint that produced this observation.
