summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:51:41 +0000
committerfcolin2007-02-01 09:51:41 +0000
commitcb6b912700e659c58cc342c5c15ebfb8bd756169 (patch)
tree7f4cbbe2db383b1a1521066ee639c933f89eb44d /CSharp/Ivy
parentd60a199ca48639a3ba74e71967a133e8c96a5ed6 (diff)
downloadivy-csharp-cb6b912700e659c58cc342c5c15ebfb8bd756169.zip
ivy-csharp-cb6b912700e659c58cc342c5c15ebfb8bd756169.tar.gz
ivy-csharp-cb6b912700e659c58cc342c5c15ebfb8bd756169.tar.bz2
ivy-csharp-cb6b912700e659c58cc342c5c15ebfb8bd756169.tar.xz
Utilisateur : Fcolin Date : 12/01/06 Heure : 12:53 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 13)
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r--CSharp/Ivy/Ivy/IvyWatcher.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/CSharp/Ivy/Ivy/IvyWatcher.cs b/CSharp/Ivy/Ivy/IvyWatcher.cs
index d5141f3..28d7b7b 100644
--- a/CSharp/Ivy/Ivy/IvyWatcher.cs
+++ b/CSharp/Ivy/Ivy/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