diff options
author | fcolin | 2007-02-01 10:03:30 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 10:03:30 +0000 |
commit | 6bedcdf330347a5e65e3a0df05b2137d6dfdde12 (patch) | |
tree | 57d6c760733c435c1ccea9d6d202bc3cb5e02193 | |
parent | b248078ec6f9db57e7320b36d1718040266d8c37 (diff) | |
download | ivy-csharp-6bedcdf330347a5e65e3a0df05b2137d6dfdde12.zip ivy-csharp-6bedcdf330347a5e65e3a0df05b2137d6dfdde12.tar.gz ivy-csharp-6bedcdf330347a5e65e3a0df05b2137d6dfdde12.tar.bz2 ivy-csharp-6bedcdf330347a5e65e3a0df05b2137d6dfdde12.tar.xz |
Utilisateur : Fcolin Date : 12/01/06 Heure : 12:53 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 13)
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyWatcher.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyWatcher.cs b/CSharp/Ivy/IvyPPC/IvyWatcher.cs index d5141f3..28d7b7b 100644 --- a/CSharp/Ivy/IvyPPC/IvyWatcher.cs +++ b/CSharp/Ivy/IvyPPC/IvyWatcher.cs @@ -66,7 +66,7 @@ namespace IvyBus broadcast.SetSocketOption(SocketOptionLevel.Udp, SocketOptionName.AddMembership, new MulticastOption( group ));
}
// TODO support the Two protocol
- if (Properties.Settings.Default.IvyProtocolVersion == 4)
+ if (bus.protocolVersion == 4)
stream = new IvyUDPStreamV4(broadcast);
else
stream = new IvyUDPStreamV3(broadcast);
@@ -99,13 +99,13 @@ namespace IvyBus stream.receiveMsg(out remoteEP, out version,out port,out appId,out appName);
IPAddress remotehost = remoteEP.Address;
- traceDebug("BUSWATCHER Receive Broadcast from " + Dns.GetHostByAddress(remotehost).HostName+ ":" + remoteEP.Port);
+ traceDebug("BUSWATCHER Receive Broadcast from " + Dns.GetHostEntry(remotehost).HostName + ":" + remoteEP.Port);
//TODO if ( !isInDomain( remotehost ) ) continue;
if (version != stream.ProtocolVersion)
{
- Console.WriteLine("Ignoring bad protocol version {0} expected {1}", version, stream.ProtocolVersion);
+ Console.Error.WriteLine("Ignoring bad protocol version {0} expected {1}", version, stream.ProtocolVersion);
continue;
}
@@ -115,7 +115,7 @@ namespace IvyBus if ( (port == bus.applicationPort) && (remotehost.Equals(bus.applicationHost)) )
continue;
- traceDebug("BUSWATCHER Broadcast de " + Dns.GetHostByAddress(remotehost).HostName + ":" + remoteEP.Port + " port " + port +
+ traceDebug("BUSWATCHER Broadcast de " + Dns.GetHostEntry(remotehost).HostName + ":" + remoteEP.Port + " port " + port +
" version " + version +
" id " + appId +
" name " + appName);
@@ -128,12 +128,12 @@ namespace IvyBus }
catch (Exception e)
{
- Console.Error.WriteLine("can't connect to " + remotehost + " port " + port + " \n"+ e.Message);
+ Console.Error.WriteLine("can't connect to " + remotehost + " port " + port + " \n" + e.Message);
}
}
catch (IOException jii)
{
- Console.Error.WriteLine("UDP listener " + jii.Message);
+ Console.Error.WriteLine("UDP listener " + jii.Message);
running = false;
}
// catch (SocketException se)
@@ -197,7 +197,7 @@ namespace IvyBus }
catch (ArgumentException e)
{
- Console.Out.WriteLine("Bad broascat addr " + net);
+ Console.Error.WriteLine("Bad broascat addr " + net + "error " + e.Message);
return null;
}
// out.println("net: "+net);
@@ -208,7 +208,7 @@ namespace IvyBus {
int sep_index = net.LastIndexOf(":");
int port = (sep_index == - 1)?Ivy.DEFAULT_PORT:Int32.Parse(net.Substring(sep_index + 1));
- // Console.Writeline("net: ["+net+"]\nsep_index: "+sep_index+"\nport: "+port);
+ // Console.Error.Writeline("net: ["+net+"]\nsep_index: "+sep_index+"\nport: "+port);
return port;
}
@@ -216,7 +216,7 @@ namespace IvyBus private void traceDebug(String s)
{
if (bus.Debug)
- Console.Out.WriteLine("-->ivywatcher<-- " + s);
+ Console.Error.WriteLine("-->ivywatcher<-- " + s);
}
}
// class IvyWatcher
|