aboutsummaryrefslogtreecommitdiff
path: root/src/IvyWatcher.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/IvyWatcher.java')
-rwxr-xr-xsrc/IvyWatcher.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/IvyWatcher.java b/src/IvyWatcher.java
index b95af97..c9a661f 100755
--- a/src/IvyWatcher.java
+++ b/src/IvyWatcher.java
@@ -190,13 +190,13 @@ class IvyWatcher implements Runnable {
Matcher m = recoucou.matcher(msg);
// is it a correct broadcast packet ?
if (!m.matches()) {
- System.err.println("nomatch - Ignoring bad format broadcast from "+ remotehostname+":"+packet.getPort()+" ["+msg+"]");
+ System.err.println("Ignoring bad format broadcast from "+ remotehostname+":"+packet.getPort());
return true;
}
// is it the correct protocol version ?
int version = Integer.parseInt(m.group(1));
if ( version < Protocol.PROTOCOLMINIMUM ) {
- System.err.println("too old - Ignoring bad format broadcast from "+
+ System.err.println("Ignoring bad format broadcast from "+
remotehostname+":"+packet.getPort()
+" protocol version "+remotehost+" we need "+Protocol.PROTOCOLMINIMUM+" minimum");
return true;
@@ -242,6 +242,8 @@ class IvyWatcher implements Runnable {
traceDebug("no known agent originating from " + remotehost + ":" + remotePort);
try {
Socket s = new Socket(remotehost,remotePort);
+ s.setReceiveBufferSize(bus.getBufferSize());
+ s.setTcpNoDelay(true);
if (!bus.createIvyClient(s,remotePort,false)) return false ;
} catch ( java.net.ConnectException jnc ) {
traceDebug("cannot connect to "+remotehostname+":"+remotePort+", he probably stopped his bus");
@@ -250,7 +252,7 @@ class IvyWatcher implements Runnable {
traceDebug("there is already a request originating from " + remotehost + ":" + remotePort);
}
} catch (NumberFormatException nfe) {
- System.err.println("nfe: Ignoring bad format broadcast from "+remotehostname);
+ System.err.println("Ignoring bad format broadcast from "+remotehostname);
return true;
} catch ( UnknownHostException e ) {
System.err.println("Unkonwn host "+remotehost +","+e.getMessage());