From 875dd65dcbfc7da28d5bb050b114670a78d2b8d0 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Tue, 11 Nov 2008 02:30:21 +0000
Subject: [PATCH]  * I2PTunnel: Change "interactive" max window size to 16 (was
 1)

---
 .../src/net/i2p/i2ptunnel/web/IndexBean.java  | 21 +++++++++++++++++--
 installer/resources/i2ptunnel.config          |  2 +-
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java
index 2eb039cdd3..d8e9df6f03 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java
@@ -395,6 +395,19 @@ public class IndexBean {
             return "";
     }
     
+    public String getHTMLStreams(int tunnel) {
+        TunnelController tun = getController(tunnel);
+        if (tun != null) {
+            if (tunnel != 0 &&
+                "true".equalsIgnoreCase(tun.getSharedClient()) &&
+                isClient(tunnel))
+                return "Listed above";
+            else
+                return tun.getHTMLStreams();
+        } else
+            return "";
+    }
+    
     public String getSharedClient(int tunnel) {
     	TunnelController tun = getController(tunnel);
     	if (tun != null)
@@ -707,7 +720,11 @@ public class IndexBean {
             }
         } 
         if ("interactive".equals(_profile))
-            config.setProperty("option.i2p.streaming.maxWindowSize", "1");
+            // This was 1 which doesn't make much sense
+            // The real way to make it interactive is to make the streaming lib
+            // MessageInputStream flush faster but there's no option for that yet,
+            // Setting it to 16 instead of the default but not sure what good that is either.
+            config.setProperty("option.i2p.streaming.maxWindowSize", "16");
         else
             config.remove("option.i2p.streaming.maxWindowSize");
     }
@@ -737,4 +754,4 @@ public class IndexBean {
             buf.append((String)msgs.get(i)).append("\n");
         }
     }
-}
\ No newline at end of file
+}
diff --git a/installer/resources/i2ptunnel.config b/installer/resources/i2ptunnel.config
index fb085d2912..48d18b95ec 100644
--- a/installer/resources/i2ptunnel.config
+++ b/installer/resources/i2ptunnel.config
@@ -26,7 +26,7 @@ tunnel.1.i2cpPort=7654
 tunnel.1.option.inbound.nickname=shared clients
 tunnel.1.option.outbound.nickname=shared clients
 tunnel.1.option.i2p.streaming.connectDelay=1000
-tunnel.1.option.i2p.streaming.maxWindowSize=1
+tunnel.1.option.i2p.streaming.maxWindowSize=16
 tunnel.1.startOnLoad=true
 
 # I2P's mtn server
-- 
GitLab