Core LibraryalphaAPI 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.

method libtmux-cxx latest

Server.is_alive

Whether a server is answering on this socket.

Source and package
Qualified name
libtmux::Server::is_alive
Namespace
libtmux
Declared in
Server
Package
libtmux-cxx
Source
include/libtmux/server.hpp
Other languages
Perl Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScriptRustGoJavaC#Swift Kotlin Scala OCaml F# Clojure
[[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]] bool is_alive(std::chrono::milliseconds timeout = std::chrono::seconds{5}) const;

Description#

False covers every reason — no server, no socket, a tmux that would not run — because a caller who only wants to know whether to start one does not need to tell them apart.

Bounded by default: the one call whose whole job is answering "can I reach this" must not be the call that hangs. A stalled socket or a stopped server answers no, in time, rather than never.

Guides#

Pages that discuss is_alive.

In other ports#

Whether the server is running

Equivalents of Whether the server is running in other languages
Language Equivalent
Python libtmux.Server.is_alive
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript server.Server.isAlive
Rust server.Server.is_alive
Go tmux.Server.IsAlive
Java io.github.libtmux.Server.isAlive
C# LibTmux.Server.IsAliveAsync
Swift Server.isRunning()
OCaml No direct public OCaml equivalent is recorded for this operation.
Perl Explicit snapshot acquisition returns observed data or a typed failure; operational failures are not converted to false.

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference