# Libtmux_eio.Client.connect

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L130
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-connect/

```
val connect :
  ?cleanup:Cleanup.t ->
  ?binary:string ->
  ?timeout:float ->
  sw:Eio.Switch.t ->
  process_mgr:[> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr ->
  mono_clock:[> Eio.Time.Mono.ty ] Eio.Time.Mono.t ->
  Libtmux.Endpoint.t -> (t, Libtmux.Error.t) result
```

Attach to an existing local Linux daemon in the same PID namespace and shared filesystem. Requires pidfd support. Default exchange timeout: one second. All client calls belong to the connecting OCaml domain. Initial and auxiliary attachments suppress tmux's [`update-environment`](/en/tmux/latest/catalog/options/update-environment/) behavior.

## Parameters

- `cleanup?` (`Cleanup.t`)
- `binary?` (`string`)
- `timeout?` (`float`)
- `sw` (`Eio.Switch.t`)
- `process_mgr` (``[> [> `Generic ] Eio.Process.mgr_ty ] Eio.Process.mgr``)
- `mono_clock` (`[> Eio.Time.Mono.ty ] Eio.Time.Mono.t`)
- `arg1` (`Libtmux.Endpoint.t`)
