# LibTmux::Control::Connection.connect

- **Module:** LibTmux::Control
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Control/Connection.rakumod#L160
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-control-connection-connect/

```
method connect(*%options --> LibTmux::Control::Connection:D)
```

Observe, attach and verify a persistent connection to an exact session ID.

Observe, attach and verify a persistent connection to an exact session ID.

## Parameters

- `%options`

## tmux command

The tmux commands behind `connect`.

- [`attach-session`](/en/tmux/latest/manual/attach-session/)
- [`refresh-client`](/en/tmux/latest/manual/refresh-client/) (new-layouts negotiation is enabled)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_attach_session_entry`](/en/tmux/latest/reference/c-variable-cmd_attach_session_entry/) (attribute)
- [`cmd_attach_session_exec`](/en/tmux/latest/reference/c-function-cmd-attach-session-c-cmd_attach_session_exec/) (function)
- [`cmd_refresh_client_entry`](/en/tmux/latest/reference/c-variable-cmd_refresh_client_entry/) (attribute)
- [`cmd_refresh_client_exec`](/en/tmux/latest/reference/c-function-cmd-refresh-client-c-cmd_refresh_client_exec/) (function)
