aboutsummaryrefslogtreecommitdiff
path: root/src/IvyWatcher.java
diff options
context:
space:
mode:
authorjestin2009-07-28 07:22:08 +0000
committerjestin2009-07-28 07:22:08 +0000
commitd93623316e15f774688bd7523c9c7431bffa689e (patch)
treef81c3486f29f42154ec44f08f00e4daf9be94512 /src/IvyWatcher.java
parent51960a8031bfaee1d49cf95b6c9a906641c6afff (diff)
downloadivy-java-d93623316e15f774688bd7523c9c7431bffa689e.zip
ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.gz
ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.bz2
ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.xz
TCP NO DELAY
Diffstat (limited to 'src/IvyWatcher.java')
-rwxr-xr-xsrc/IvyWatcher.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/IvyWatcher.java b/src/IvyWatcher.java
index bf8dc3f..3281079 100755
--- a/src/IvyWatcher.java
+++ b/src/IvyWatcher.java
@@ -14,6 +14,9 @@
* thing.
*
* CHANGELOG:
+ * 1.2.13:
+ * - TCP_NO_DELAY to disable Nagle's algorithm
+ * - private static ?! pour already present ...
* 1.2.9:
* - added an application Id in the UDP broadcast. It seems to be ok with
* most implementations ( VERSION PORT APPID APPNAME \n) is compatible with (VERSION
@@ -187,7 +190,9 @@ class IvyWatcher implements Runnable {
if (!alreadyBroadcasted(remotehost.toString(),remotePort)) {
traceDebug("no known agent originating from " + remotehost + ":" + remotePort);
try {
- bus.createIvyClient(new Socket(remotehost,remotePort),remotePort,false);
+ Socket s = new Socket(remotehost,remotePort);
+ s.setTcpNoDelay(true);
+ bus.createIvyClient(s,remotePort,false);
} catch ( java.net.ConnectException jnc ) {
traceDebug("cannot connect to "+remotehostname+":"+remotePort+", he probably stopped his bus");
}
@@ -278,7 +283,8 @@ class IvyWatcher implements Runnable {
*
* regoes static ...
*/
- private static Hashtable alreadySocks=new Hashtable();
+ //private static Hashtable alreadySocks=new Hashtable();
+ private Hashtable alreadySocks=new Hashtable();
private synchronized boolean alreadyBroadcasted(String s,int port) {
// System.out.println("DEBUUUUUUUG " + s+ ":" + port);
if (s==null) return false;