* delay the ack of a syn

* make sure we ack duplicate messages received (if we aren't already doing so)
* implement a choke on the local buffer, in case we receive data faster than its
  removed from the i2psocket's MessageInputStream (handle via packet drop and
  explicit congestion notification)
This commit is contained in:
jrandom
2004-11-09 11:00:04 +00:00
committed by zzz
parent 30074be5a5
commit 83165df7e5
3 changed files with 47 additions and 5 deletions
@@ -31,10 +31,15 @@ class SchedulerReceived extends SchedulerImpl {
long timeTillSend = con.getNextSendTime() - _context.clock().now();
if (timeTillSend <= 0) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("received con... send a packet");
con.sendAvailable();
con.setNextSendTime(-1);
if (con.getNextSendTime() > 0) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("received con... send a packet");
con.sendAvailable();
con.setNextSendTime(-1);
} else {
con.setNextSendTime(_context.clock().now() + con.getOptions().getSendAckDelay());
reschedule(con.getOptions().getSendAckDelay(), con);
}
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("received con... time till next send: " + timeTillSend);