# limits.ControlLimits

- **Module:** limits
- **Package:** libtmux
- **Language:** Rust
- **Kind:** struct
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/limits.rs#L248
- **Page:** https://libtmux.org/en/rs/latest/reference/limits-controllimits/

What one control-mode connection may accumulate before it gives up.

Control mode is a framed text protocol read from a process that keeps
running, so the framing is the only thing bounding memory: a line that
never ends, or a `%begin` block whose `%end` never arrives, otherwise grows
until the machine notices. A subprocess dispatch at least ends when the
process does.

## Example

```rust
use libtmux::ControlLimits;

let limits = ControlLimits::default().max_line_bytes(4096);
assert_eq!(limits.line_bytes(), 4096);
```

## Members

- `DEFAULT_LINE_BYTES` (constant): 8 MiB for one line. A pane printing a single enormous line is the realistic way to reach this, and it is well past anything a terminal displays.
- `DEFAULT_BLOCK_BYTES` (constant): 64 MiB for one `%begin`/`%end` block, which is a whole command's answer rather than one line.
- `max_line_bytes` (method): Set the budget for a single protocol line.
- `max_block_bytes` (method): Set the budget for one command's response block.
- `line_bytes` (method): The budget for a single protocol line.
- `block_bytes` (method): The budget for one command's response block.
