# LibTmux.ServerMirror.OpenAsync

- **Module:** LibTmux
- **Package:** LibTmux
- **Language:** C#
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-dotnet/blob/cf34b255c896d19a97e7d7fabea58609c916012d/src/LibTmux/Snapshots/ServerMirror.cs#L149
- **Page:** https://libtmux.org/en/csharp/latest/reference/libtmux-servermirror-openasync/

```
LibTmux.ServerMirror.OpenAsync(anchor: Session, refreshEvery: TimeSpan, cancellationToken: CancellationToken) -> Task<ServerMirror>
```

Mirrors the server an anchor session belongs to.

## Parameters

- `anchor` (`Session`): The session the mirror's control client attaches to.
- `refreshEvery` (`TimeSpan`): How long a quiet mirror waits before capturing anyway, so a change tmux
does not announce is seen within that long; zero never does.
- `cancellationToken` (`CancellationToken`): Cancels attaching and the first capture.

## Returns

A mirror whose first view is already captured.

## Raises

- [`ArgumentOutOfRangeException`](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception): The refresh interval is negative.
- [`IncompleteSnapshotException`](/en/csharp/latest/reference/libtmux-incompletesnapshotexception/): The session was not read through a server.
