Skip to content

Struct SYN_Heartbeat

ClassList > SYN_Heartbeat

Heartbeat monitor — send keepalives, track peer liveness.

  • #include <syn_heartbeat.h>

Public Attributes

Type Name
void * cb_ctx
SYN_ErrLog * errlog
uint32_t interval_ms
uint32_t last_tx_tick
SYN_HB_Callback on_peer_found
SYN_HB_Callback on_peer_lost
uint8_t peer_capacity
uint8_t peer_count
SYN_HB_Peer * peers
SYN_Router * router
uint32_t timeout_ms

Public Attributes Documentation

variable cb_ctx

void* SYN_Heartbeat::cb_ctx;

Context for callbacks


variable errlog

SYN_ErrLog* SYN_Heartbeat::errlog;

Optional error logging


variable interval_ms

uint32_t SYN_Heartbeat::interval_ms;

How often to send our heartbeat


variable last_tx_tick

uint32_t SYN_Heartbeat::last_tx_tick;

When we last sent


variable on_peer_found

SYN_HB_Callback SYN_Heartbeat::on_peer_found;

Called when peer reappears


variable on_peer_lost

SYN_HB_Callback SYN_Heartbeat::on_peer_lost;

Called when peer goes dead


variable peer_capacity

uint8_t SYN_Heartbeat::peer_capacity;

Peer array capacity


variable peer_count

uint8_t SYN_Heartbeat::peer_count;

Number of tracked peers


variable peers

SYN_HB_Peer* SYN_Heartbeat::peers;

Caller-owned peer array


variable router

SYN_Router* SYN_Heartbeat::router;

Packet router


variable timeout_ms

uint32_t SYN_Heartbeat::timeout_ms;

Peer considered dead after this



The documentation for this class was generated from the following file src/syntropic/net/syn_heartbeat.h