summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC/IvyWatcher.cs
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyPPC/IvyWatcher.cs')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyWatcher.cs22
1 files changed, 8 insertions, 14 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyWatcher.cs b/CSharp/Ivy/IvyPPC/IvyWatcher.cs
index 28d7b7b..f453614 100644
--- a/CSharp/Ivy/IvyPPC/IvyWatcher.cs
+++ b/CSharp/Ivy/IvyPPC/IvyWatcher.cs
@@ -81,7 +81,7 @@ namespace IvyBus
/// </summary>
public void Run()
{
- traceDebug("beginning of a watcher Thread");
+ bus.traceDebug("beginning of a watcher Thread");
try
{
@@ -99,7 +99,7 @@ namespace IvyBus
stream.receiveMsg(out remoteEP, out version,out port,out appId,out appName);
IPAddress remotehost = remoteEP.Address;
- traceDebug("BUSWATCHER Receive Broadcast from " + Dns.GetHostEntry(remotehost).HostName + ":" + remoteEP.Port);
+ bus.traceDebug("BUSWATCHER Receive Broadcast from " + Dns.GetHostEntry(remotehost).HostName + ":" + remoteEP.Port);
//TODO if ( !isInDomain( remotehost ) ) continue;
@@ -115,7 +115,7 @@ namespace IvyBus
if ( (port == bus.applicationPort) && (remotehost.Equals(bus.applicationHost)) )
continue;
- traceDebug("BUSWATCHER Broadcast de " + Dns.GetHostEntry(remotehost).HostName + ":" + remoteEP.Port + " port " + port +
+ bus.traceDebug("BUSWATCHER Broadcast de " + Dns.GetHostEntry(remotehost).HostName + ":" + remoteEP.Port + " port " + port +
" version " + version +
" id " + appId +
" name " + appName);
@@ -144,13 +144,13 @@ namespace IvyBus
}
catch (SocketException se)
{
- traceDebug( "watcher socket closed: " + se.Message);
+ bus.traceDebug("watcher socket closed: " + se.Message);
}
catch (IOException ioe)
{
- traceDebug( "watcher thread ended: " + ioe.Message);
+ bus.traceDebug("watcher thread ended: " + ioe.Message);
}
- traceDebug("end of a watcher thread");
+ bus.traceDebug("end of a watcher thread");
}
/// <summary> stops the thread waiting on the broadcast socket
@@ -159,7 +159,7 @@ namespace IvyBus
{
lock(this)
{
- traceDebug("begining stopping an IvyWatcher");
+ bus.traceDebug("begining stopping an IvyWatcher");
stream.Close();
if (listenThread != null)
{
@@ -167,7 +167,7 @@ namespace IvyBus
listenThread = null;
}
// it might not even have been created
- traceDebug("ending stopping an IvyWatcher");
+ bus.traceDebug("ending stopping an IvyWatcher");
}
}
@@ -212,12 +212,6 @@ namespace IvyBus
return port;
}
-
- private void traceDebug(String s)
- {
- if (bus.Debug)
- Console.Error.WriteLine("-->ivywatcher<-- " + s);
- }
}
// class IvyWatcher
/* EOF */