# withNamedTmuxServer(_:)

- **Package:** libtmux-swift
- **Language:** Swift
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-swift/blob/f02a4668570e1cc5198c941413750e021f42c214/Tests/TmuxFixture/TmuxFixture.swift#L189
- **Page:** https://libtmux.org/reference/swift/withnamedtmuxserver(_-)/

```
withNamedTmuxServer(_:)(body: (Server) async throws -> Result) -> Result
```

Runs `body` against a private tmux server addressed by socket *name*, and always kills it.

The same guarantees as ``withTmuxServer(_:)`` — its own server, killed on
the way out and reaped if this process is killed outright — for the half of
``Endpoint`` that a path-addressed fixture never exercises.

## Raises

- `Result`
