Use a queue for congestion pings
This reduces the data sent, and avoids any problems with the
client corrupting it.
diff --git a/common/rfb/VNCSConnectionST.h b/common/rfb/VNCSConnectionST.h
index 74a6946..ccca674 100644
--- a/common/rfb/VNCSConnectionST.h
+++ b/common/rfb/VNCSConnectionST.h
@@ -27,7 +27,9 @@
#ifndef __RFB_VNCSCONNECTIONST_H__
#define __RFB_VNCSCONNECTIONST_H__
+#include <list>
#include <set>
+
#include <rfb/SConnection.h>
#include <rfb/SMsgWriter.h>
#include <rfb/VNCServerST.h>
@@ -160,7 +162,7 @@
// Congestion control
void writeRTTPing();
- void handleRTTPong(const struct RTTInfo &rttInfo);
+ void handleRTTPong();
bool isCongested();
void updateCongestion();
@@ -195,8 +197,8 @@
unsigned minRTT;
bool seenCongestion;
- unsigned pingCounter;
Timer congestionTimer;
+ std::list<struct RTTInfo> pings;
VNCServerST* server;
SimpleUpdateTracker updates;