# tmux_stream:join/2

- **Package:** libtmux_erlang
- **Language:** Erlang
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-erlang/blob/38478dff54579a4f408005d0265031abdf3a880a/apps/libtmux_erlang/src/tmux_stream.erl#L74
- **Page:** https://libtmux.org/en/erlang/latest/reference/tmux_stream-join-2/

```
join/2
-spec join(subscription(), #{credit => credit()}) ->
              {ok, subscription()} | {error, map()}.
```

Subscribe this process to the same dedicated client as an active subscription. The new subscription has its own credit and sequence numbers. It starts receiving data when it joins.

## Parameters

- `Subscription` (`subscription()`)
- `Options` (`#{credit => credit()}`)

## Guides

Pages that discuss `join/2`.

- [Control connections](/en/erlang/latest/topics/control/)
