# types.ConnectedServer.subscribe

- **Module:** types
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/types.ts#L1233
- **Page:** https://libtmux.org/en/ts/latest/reference/types-connectedserver-subscribe/

```
subscribe(): TmuxEventStream
```

Open an independent view of the notifications arriving on this connection.

Each call is its own subscription with its own buffer, so a `for await`
loop and a [`waitFor`](/en/ts/latest/reference/types-connectedserver-waitfor/) can run side by side.
