# control.ControlMode.attach_with_limits

- **Module:** control.ControlMode
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/control.rs#L465
- **Page:** https://libtmux.org/reference/rs/control-controlmode-attach_with_limits/

```
control.ControlMode.attach_with_limits(server: &Server, session: &SessionId, limits: ControlLimits) -> Result<Self, Error>
```

Attach with explicit frame budgets.

Control mode reads from a process that keeps running, so the framing is
the only thing bounding memory: a line that never ends, or a block
whose `%end` never arrives, otherwise grows until the machine notices.

# Errors

Returns an error when the connection cannot be opened, as
[`Self::attach`] does. [`Server::shutdown`] cancels an attach in
progress and refuses later attempts.
