Core Library0.xAPI reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

method libtmux-cxx

Server.available

Whether the tmux this handle reaches provides feature: what capabilities().supports(feature) says, and for a feature that needs a tmux release, that release too.

Source and package
Qualified name
libtmux::Server::available
Namespace
libtmux
Declared in
Server
Package
libtmux-cxx
Source
include/libtmux/server.hpp
[[C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.Language documentation]] expected<bool, CommandFailure> available(ServerFeature feature) const;

Description

ServerFeature::control_mode needs one. This answers false exactly where control(), control_with_options(), over_control() and Connection::connect() refuse the daemon for its release, because the answer and the refusal read one release table. true means the release does not stand in the way, not that a daemon is listening.

The release is read as tmux_version() reads it: the daemon's when one answers, otherwise the executable's, and ExecutorOptions::version when the transport declares one. That can run tmux, so the call can fail, with the failure tmux_version() reports. A backend that settles the answer alone runs nothing: false for psmux and for an implementation nobody recognises, true for a feature with no release floor.

Parameters

Recorded calls

source calls
No call edges in the C++ model.

The C++ reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls libtmux::Server::available.

Esc
Search in

Type to search.

Reference previewOpen reference