onHeartbeat method

  1. @override
void onHeartbeat(
  1. Connect heartbeat,
  2. SocketInfo source
)

Handle an incoming heartbeat coming from a given source.

Be sure to check Connect.sender and Connect.receiver, and compare the source against the current destination to properly handle the heartbeat.

Implementation

@override
void onHeartbeat(Connect heartbeat, SocketInfo source) => _heartbeats++;