heartbeat_task

Function heartbeat_task 

Source
pub async fn heartbeat_task(
    shutdown: CancellationToken,
    client: Arc<dyn SignalingClient>,
    actor_id: ActrId,
    credential_state: CredentialState,
    mailbox: Arc<dyn Mailbox>,
    heartbeat_interval: Duration,
)
Expand description

Heartbeat task that periodically sends Ping messages to signaling server

This task runs in a loop, sending heartbeat messages at the specified interval and handling Pong responses, including credential warnings.

ยงArguments

  • shutdown - Cancellation token for graceful shutdown
  • client - Signaling client for sending heartbeats
  • actor_id - Actor ID for heartbeat messages
  • credential_state - Shared credential state
  • mailbox - Mailbox instance for backlog statistics
  • heartbeat_interval - Interval between heartbeats