Flow-IPC 3.0.0
Flow-IPC project: Public API.
Static Public Attributes | List of all members
ipc::session::Session_cfg Class Reference

Grouping of compile-time config/knobs (as of this writing: constants) governing some of the behavior of ipc::session sessions. More...

#include <session_cfg.hpp>

Static Public Attributes

static constexpr util::Fine_duration S_PING_PERIOD = boost::chrono::seconds{2}
 The period with which each session-internal channel – notably the session master channel; also the internal channel used by an arena-lending SHM-provider (as of this writing SHM-jemalloc) – sends low-level keep-alive pings to the opposing peer. More...
 
static constexpr util::Fine_duration S_IDLE_TIMEOUT = boost::chrono::seconds{15}
 The idle timeout of each session-internal channel (see S_PING_PERIOD): if no low-level traffic – including the opposing side's pings – arrives in this long, the channel is considered hosed; and hence the session is too. More...
 

Detailed Description

Grouping of compile-time config/knobs (as of this writing: constants) governing some of the behavior of ipc::session sessions.

Rationale

Some of these could be viewed as implementation details; nevertheless they are public, much like transport::Native_socket_stream_cfg: it is harmless, and it can be helpful for logging/reporting or for understanding the system's behavior (e.g., how quickly a stuck opposing process is detected).

Todo:
Session_cfg is the nucleus of a more general overhaul of ipc::session configuration (e.g., grouping various Session / Session_server template parameters into a struct; possibly per-Client_app knobs). Its constants may then become run-time and/or per-session-configurable.

Member Data Documentation

◆ S_IDLE_TIMEOUT

constexpr util::Fine_duration ipc::session::Session_cfg::S_IDLE_TIMEOUT = boost::chrono::seconds{15}
staticconstexpr

The idle timeout of each session-internal channel (see S_PING_PERIOD): if no low-level traffic – including the opposing side's pings – arrives in this long, the channel is considered hosed; and hence the session is too.

See transport::Channel::idle_timer_run().

Its purpose is to detect an opposing process that is stuck (alive but not functioning), as opposed to dead (detected immediately regardless). As a false positive (hosing a healthy session over a transient stall) is costlier than slower detection of a stuck peer, the value is generous relative to S_PING_PERIOD.

◆ S_PING_PERIOD

constexpr util::Fine_duration ipc::session::Session_cfg::S_PING_PERIOD = boost::chrono::seconds{2}
staticconstexpr

The period with which each session-internal channel – notably the session master channel; also the internal channel used by an arena-lending SHM-provider (as of this writing SHM-jemalloc) – sends low-level keep-alive pings to the opposing peer.

See transport::Channel::auto_ping().

The opposing side uses the same value; hence S_IDLE_TIMEOUT (which must comfortably exceed it) works consistently in both directions.


The documentation for this class was generated from the following file: