ControlSession.send(_:)
Swift
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java Unavailable
- .NET Unavailable
- C++ Unavailable
- Swift
- Declared in
- ControlSession
- Package
- libtmux-swift
- Source
- Sources/LibTmux/ControlSession.swift
- send(_:) ( command : TmuxCommand ) ControlReply
-
Sends a command and waits for the block tmux brackets its reply with.
A tmux error closes the block with
%errorrather than failing the connection, so it comes back as a reply whoseControlReply/isErroris 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
Discussed in Control mode vs one-shot
0 declared, 0 inherited