//HashSet<byte> futurePings // FUTURE? Packet loss count may be invalid (too high) until we detect older pings. private void Handle(ping_spacket msg) { if (msg.number <= lastPingReceived) { l.Debug("Duplicate (or out of order) ping received: " + msg.number); return; } if (msg.number != lastPingReceived + 1) { l.Trace("Missed a ping? lastPingReceived:" + lastPingReceived + ", ping from server: " + msg.number); } lastPingReceived = msg.number; if (lastPingReceived == 255) { l.Warn("Wrapping lastPingReceived around. VERIFY"); lastPingReceived = -1; } PingsReceived++; //l.Trace("Sending ping in response to server ping " + msg.number); SendPing(msg.number, 1); }