forked from I2P_Developers/i2p.i2p
2005-04-24 jrandom
* Added a pool of PRNGs using a different synchronization technique, hopefully sufficient to work around IBM's PRNG bugs until we get our own Fortuna. * In the streaming lib, don't jack up the RTT on NACK, and have the window size bound the not-yet-ready messages to the peer, not the unacked message count (not sure yet whether this is worthwile). * Many additions to the messageHistory log. * Handle out of order tunnel fragment delivery (not an issue on the live net with TCP, but critical with UDP). and for udp stuff: * implemented tcp-esque rto code in the udp transport * make sure we don't ACK too many messages at once * transmit fragments in a simple (nonrandom) order so that we can more easily adjust timeouts/etc. * let the active outbound pool grow dynamically if there are outbound slots to spare * use a simple decaying bloom filter at the UDP level to drop duplicate resent packets.
This commit is contained in:
@ -263,7 +263,7 @@ public class FragmentHandler {
|
||||
SimpleTimer.getInstance().removeEvent(msg.getExpireEvent());
|
||||
receiveComplete(msg);
|
||||
} else {
|
||||
noteReception(msg.getMessageId(), 0);
|
||||
noteReception(msg.getMessageId(), 0, msg.toString());
|
||||
}
|
||||
|
||||
if (isNew && fragmented && !msg.isComplete()) {
|
||||
@ -325,7 +325,7 @@ public class FragmentHandler {
|
||||
_context.statManager().addRateData("tunnel.fragmentedComplete", msg.getFragmentCount(), msg.getLifetime());
|
||||
receiveComplete(msg);
|
||||
} else {
|
||||
noteReception(msg.getMessageId(), fragmentNum);
|
||||
noteReception(msg.getMessageId(), fragmentNum, msg.toString());
|
||||
}
|
||||
|
||||
if (isNew && !msg.isComplete()) {
|
||||
@ -359,9 +359,9 @@ public class FragmentHandler {
|
||||
}
|
||||
}
|
||||
|
||||
protected void noteReception(long messageId, int fragmentId) {}
|
||||
protected void noteReception(long messageId, int fragmentId, String status) {}
|
||||
protected void noteCompletion(long messageId) {}
|
||||
protected void noteFailure(long messageId) {}
|
||||
protected void noteFailure(long messageId, String status) {}
|
||||
|
||||
/**
|
||||
* Receive messages out of the tunnel endpoint. There should be a single
|
||||
@ -393,7 +393,7 @@ public class FragmentHandler {
|
||||
}
|
||||
if (removed && !_msg.getReleased()) {
|
||||
_failed++;
|
||||
noteFailure(_msg.getMessageId());
|
||||
noteFailure(_msg.getMessageId(), _msg.toString());
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn("Dropped failed fragmented message: " + _msg);
|
||||
_context.statManager().addRateData("tunnel.fragmentedDropped", _msg.getFragmentCount(), _msg.getLifetime());
|
||||
|
Reference in New Issue
Block a user