pub struct HeartbeatConfig {
pub interval: Duration,
pub pong_timeout: Duration,
pub retry: HeartbeatRetryConfig,
}Expand description
Active Ping/Pong heartbeat parameters on each physical connection.
Fields§
§interval: DurationInterval for checking whether to send a heartbeat Ping; the default is 20 seconds. No new probe is created while another Ping is pending.
pong_timeout: DurationThe time limit for waiting for a matching Pong after the local Ping write succeeds. The default is 45 seconds.
Local write completion does not mean the peer has received the Ping: TCP/TLS buffering, network delay, peer processing, and local receive scheduling can consume this budget. A responsive peer can still exceed a short deadline under load. The deadline is not extended by unrelated traffic or by a late matching Pong.
retry: HeartbeatRetryConfigBounded recovery and safe Ping-write retry policy. The default keeps the existing fail-fast behavior by disabling both retry paths.