# libtmux::Server::at_socket_path

- **Module:** libtmux::Server
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/85e8bd603a322dc32bb8b9aeb1a72bcf36945f1d/include/libtmux/server.hpp#L62
- **Page:** https://libtmux.org/reference/cxx/libtmux-server-at_socket_path/

```
libtmux::Server::at_socket_path(path: std::string_view, observer: CommandObserver = {}, policy: ExecutionPolicy = {}) -> expected< Server, CommandFailure >
```

`-S path`: the socket file, used verbatim.

These report `CommandFailure`, the same type every other call reports, rather than the `SocketError` the argument builders use: a factory that failed differently is a factory nothing can be chained onto. The reason a selector was rejected is in the diagnostic, and `socket_path_arguments` still returns the enum for a caller that wants to branch on it.

An observer, if given, is told about every command this server runs. It is fixed at construction because the connection is immutable afterwards, and that is what makes a Server safe to copy between threads. The policy is fixed for the same reason, and says what a call gets when it names no timeout or limit of its own.
