From 4dbb53d4c3aa1a1933bf3c633b16c22ed20c2aec Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:03:32 +0000 Subject: Utilisateur : Fcolin Date : 24/01/06 Heure : 15:44 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 14) --- CSharp/Ivy/IvyPPC/IvyWatcher.cs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'CSharp') 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 /// 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"); } /// 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 */ -- cgit v1.1