Author: toad
Date: 2007-11-28 19:15:22 +0000 (Wed, 28 Nov 2007)
New Revision: 16035
Modified:
trunk/freenet/src/freenet/node/PeerNode.java
Log:
comments
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2007-11-28 19:12:46 UTC
(rev 16034)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2007-11-28 19:15:22 UTC
(rev 16035)
@@ -2864,6 +2864,10 @@
}
// Recent packets sent/received
+ // We record times and weak short hashes of the last 64 packets
+ // sent/received. We can then send this information when we connect,
+ // and if there are many packets which the other side sent but we
+ // didn't receive, they can realise that they are not port forwarded.
static final int TRACK_PACKETS = 64;
private final long[] packetsSentTimes = new long[TRACK_PACKETS];
private final long[] packetsRecvTimes = new long[TRACK_PACKETS];