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.]] bool is_alive(std::chrono:: timeout = std::milliseconds chrono:: {5}) const;seconds -
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.
- Parameters
Guides#
Pages that discuss is_alive.
In other ports#
Whether the server is running
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | server |
| Rust | server |
| Go | tmux |
| Java | io |
| C# | Lib |
| Swift | Server |
| 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#.