# control.ControlMode.send

- **Module:** control.ControlMode
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/control.rs#L585
- **Page:** https://libtmux.org/en/rs/latest/reference/control-controlmode-send/

```
control.ControlMode.send(self, command: Command) -> Result<BlockResult, Error>
```

Send one command and wait for its result block.

# Errors

Returns an error when the command cannot be written as a control-mode
line, the connection has closed, or its deadline elapses while queued,
being written, or awaiting a response.

# Cancel safety

As for [`ControlSender::send`]: a command dropped while queued is never
written, and one already committed may run.
