void onPingTimer(Timer t)

Source

void onPingTimer(Timer t) {
  if (_dataReceiveCount >= 3) {
    close();
    return;
  }
  _dataReceiveCount++;

  if (_dataSent) {
    _dataSent = false;
    return;
  }
  addConnCommand(null, null);
}