From 3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605 Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 10 Oct 2008 15:45:54 +0000 Subject: Ajout de commentaire sur les menbres public --- Ivy/IvyClient.cs | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) (limited to 'Ivy/IvyClient.cs') diff --git a/Ivy/IvyClient.cs b/Ivy/IvyClient.cs index 7f29e91..8421443 100644 --- a/Ivy/IvyClient.cs +++ b/Ivy/IvyClient.cs @@ -37,6 +37,9 @@ namespace IvyBus return (other.clientPriority - clientPriority); } + /// + /// the client application Name + /// public String ApplicationName { get @@ -68,6 +71,9 @@ namespace IvyBus } } + /// + /// adress of the client + /// public IPAddress RemoteAddress { get @@ -76,6 +82,9 @@ namespace IvyBus } } + /// + /// port of the client + /// public int RemotePort { get @@ -250,11 +259,19 @@ namespace IvyBus { } catch (IOException ioe) - { - if (!(ioe.InnerException is SocketException)) - throw new IvyException(ioe.Message); - if (((SocketException)ioe.InnerException).SocketErrorCode != SocketError.ConnectionReset) + { + SocketException se = ioe.InnerException as SocketException; + if (se != null) + { + if (!(se.SocketErrorCode == SocketError.ConnectionReset || + se.SocketErrorCode == SocketError.ConnectionAborted)) + + throw new IvyException(ioe.Message); + } + else + { throw new IvyException(ioe.Message); + } } // stop the thread and close the stream @@ -558,9 +575,12 @@ namespace IvyBus { Ivy.traceProtocol(Resources.IvyClient, Resources.PingReceive + appName + " : " + arg); } - - - + + + + /// + /// return full Application name pair + /// public override String ToString() { return Resources.IvyClient+ " " + bus.appName + ":" + appName; @@ -587,6 +607,9 @@ namespace IvyBus } Ivy.traceProtocol(Resources.IvyClient,Resources.PingerThreadStopped); } + /// + /// stop the pinger Thread + /// public virtual void StopPinging() { isPinging = false; @@ -608,14 +631,15 @@ namespace IvyBus if (disposing) { // Free other state (managed objects). + if (stream != null) + { + stream.Close(); + stream = null; + } } // Free your own state (unmanaged objects). // Set large fields to null. - if (stream != null) - { - stream.Close(); - stream = null; - } + } // Use C# destructor syntax for finalization code. -- cgit v1.1