libtmux Reference MCP Search
On this page

ControlSession.send(_:)

View as Markdown

Declared in
ControlSession
Package
libtmux-swift
Source
Sources/LibTmux/ControlSession.swift
send(_:) ( command : TmuxCommand ) ControlReply
methodasync [source]
methodasync [source]
send(_:)

Sends a command and waits for the block tmux brackets its reply with.

A tmux error closes the block with %error rather than failing the connection, so it comes back as a reply whose ControlReply/isError is set — the same way a nonzero exit is a reply elsewhere in this library.

Concurrent sends are safe. tmux answers in the order it receives commands, so replies are matched to waiters in that order — which holds because writes are chained, not merely because they are usually fast. A reply exceeding 1 MiB fails with TmuxError/outputLimitExceeded(perStreamBytes:).

Raises

0 declared, 0 inherited

Esc

Type to search.