sendHeartbeat method
void
sendHeartbeat()
Implementation
void sendHeartbeat() {
timer = Timer.periodic(const Duration(seconds: 10), (timer) {
send(json.encode({'type': 'heartbeat'}));
});
}
void sendHeartbeat() {
timer = Timer.periodic(const Duration(seconds: 10), (timer) {
send(json.encode({'type': 'heartbeat'}));
});
}