# LibTmux.Server.Within

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

```
LibTmux.Server.Within(timeout: TimeSpan) -> Server
```

Returns this server with every command bounded by a timeout of the caller's choosing.

The handle shares this one's connection, so nothing is started or
verified again, and it compares equal to this one. A command that
outlasts the bound throws <see cref="TmuxTransportException" /> whose
<see cref="LibTmuxException.Dispatch" /> is
<see cref="TmuxDispatchState.Unknown" />, as with
<see cref="ServerConnectionOptions.CommandTimeout" />. A caller's own
cancellation still reads as cancellation.

## Parameters

- `timeout` (`TimeSpan`): How long tmux may take to answer each command.

## Returns

A handle to the same server. Every session, window, pane and client
taken from it gives tmux the same bound.

## Raises

- [`InvalidOperationException`](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception): This server has no connection identity.
- [`ArgumentOutOfRangeException`](https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception): The timeout does not run forward.
