From 516d0b4db84db4026f0f9deef98caedde71d8795 Mon Sep 17 00:00:00 2001 From: jrandom Date: Tue, 30 Nov 2004 23:41:51 +0000 Subject: [PATCH] 2004-11-30 jrandom * Render the burst rate fields on /config.jsp properly (thanks ugha!) * Build in a simple timeout to flush data queued into the I2PSocket but not yet flushed. * Don't explicitly flush after each SAM stream write, but leave it up to the [nonblocking] passive flush. * Don't whine about 10-99 connection events occurring in a second * Don't wait for completion of packets that will not be ACKed (duh) * Adjust the congestion window, even if the packet was resent (duh) * Make sure to wake up any blocking read()'s when the MessageInputStream is close()ed (duh) * Never wait more than the disconnect timeout for a write to complete --- .../net/i2p/i2ptunnel/I2PTunnelRunner.java | 5 ++ .../net/i2p/router/web/ConfigNetHelper.java | 7 +- .../src/net/i2p/sam/SAMStreamSession.java | 3 + .../net/i2p/client/streaming/Connection.java | 6 +- .../streaming/ConnectionDataReceiver.java | 6 +- .../client/streaming/ConnectionHandler.java | 2 + .../streaming/ConnectionPacketHandler.java | 24 +++---- .../client/streaming/MessageInputStream.java | 4 ++ .../client/streaming/MessageOutputStream.java | 66 ++++++++++++++++++- .../src/net/i2p/client/I2PSessionImpl2.java | 6 ++ history.txt | 15 ++++- .../src/net/i2p/router/RouterVersion.java | 4 +- 12 files changed, 127 insertions(+), 21 deletions(-) diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java index 6c052ce2be..1d2ef075a2 100644 --- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java +++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java @@ -110,6 +110,9 @@ public class I2PTunnelRunner extends I2PThread implements I2PSocket.SocketErrorL //i2pout.flush(); } } + if (_log.shouldLog(Log.DEBUG)) + _log.debug("Initial data " + (initialData != null ? initialData.length : 0) + + " written, starting forwarders"); Thread t1 = new StreamForwarder(in, i2pout, "toI2P"); Thread t2 = new StreamForwarder(i2pin, out, "fromI2P"); synchronized (finishLock) { @@ -117,6 +120,8 @@ public class I2PTunnelRunner extends I2PThread implements I2PSocket.SocketErrorL finishLock.wait(); } } + if (_log.shouldLog(Log.DEBUG)) + _log.debug("At least one forwarder completed, closing and joining"); // now one connection is dead - kill the other as well. s.close(); i2ps.close(); diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java index 14f67614c5..a082a6df1c 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigNetHelper.java @@ -120,10 +120,15 @@ public class ConfigNetHelper { private static String getBurstFactor(int numSeconds, String name) { StringBuffer buf = new StringBuffer(256); buf.append("