pub struct ClientConfig {
pub reconnect: bool,
pub reconnect_delay: u64,
pub max_reconnect_delay: u64,
pub max_reconnect_attempts: usize,
pub keepalive_interval: Option<u64>,
pub max_offline_queue: usize,
pub sends_hello: bool,
}Expand description
Client engine knobs. Durations are in milliseconds so the engine stays
no_std-clean; plain milliseconds turned into core::time::Duration for the clock.
Fields§
§reconnect: boolRedial after a dropped/failed connection instead of ending the engine.
Replays outbound traffic only: pending calls fail and open subscriptions
are not re-issued (so pump_client inbound mirroring stops after the first
disconnect; outbound survives).
reconnect_delay: u64Base delay (ms) before the first redial; subsequent redials grow
exponentially, capped at max_reconnect_delay.
max_reconnect_delay: u64Upper bound (ms) for the reconnect backoff. Defaults to
reconnect_delay (a fixed delay).
max_reconnect_attempts: usizeMaximum redial attempts before giving up. 0 = unlimited (default).
keepalive_interval: Option<u64>Send a keepalive Ping after this many ms of an idle connection; any
traffic resets the idle window. None (default) disables it.
max_offline_queue: usizeCapacity of the command channel, which buffers callers while the engine
isn’t draining it (a pending dial, the backoff between redials). A full
channel evicts its oldest, visibly: a dropped call resolves
RpcError::Internal, a dropped subscribe ends its stream. Defaults to
256; clamped to 1..=MAX_COMMAND_QUEUE_CAP.
sends_hello: boolSend a Ping handshake on connect and await the Pong before serving caller commands. A real protocol swaps Ping/Pong for its Hello.
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more