# io.github.libtmux.control.ControlClient.attachUnfenced

- **Module:** io.github.libtmux.control
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-java/blob/c067fced0dfd19bd6dd3d260e9d4c336becdb063/libtmux/src/main/java/io/github/libtmux/control/ControlClient.java#L142
- **Page:** https://libtmux.org/en/java/latest/reference/io-github-libtmux-control-controlclient-controlclient-attachunfenced/

```
@Operation(Kind.LIFECYCLE)
public static ControlClient attachUnfenced(
        ServerConfig config,
        SessionId session)

@Operation(Kind.LIFECYCLE)
public static ControlClient attachUnfenced(
        ServerConfig config,
        SessionId session,
        Duration timeout)
```

Attaches a control client to whatever server now answers this endpoint.

Attaching is what makes tmux push {@code %output}: a control client that never attaches is
told about command replies and nothing else.

This does not check which tmux process answered. A socket can be taken over by a new
server that reuses the same session id. {@link io.github.libtmux.Server#control} attaches to
the process a capture already named; prefer it.

## Parameters

- `config` (`ServerConfig`): which tmux and which server
- `session` (`SessionId`): the session to attach to
- `timeout` (`Duration`): how long to wait for the client to become ready (for `attachUnfenced(config, session, timeout)`)
