Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

ControlSession.send(_:)

Swift
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift

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

Discussed in Control mode vs one-shot

0 declared, 0 inherited

Esc

Type to search.