summaryrefslogtreecommitdiff
path: root/Ivy/IvyClient.cs
diff options
context:
space:
mode:
authorfcolin2008-10-10 15:45:54 +0000
committerfcolin2008-10-10 15:45:54 +0000
commit3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605 (patch)
treeb4c691f61e44c2310887ccb77b94a519a73a7fdb /Ivy/IvyClient.cs
parent8d10e8bbd1e19adc7c70e1101dbb69c213c910dd (diff)
downloadivy-csharp-3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605.zip
ivy-csharp-3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605.tar.gz
ivy-csharp-3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605.tar.bz2
ivy-csharp-3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605.tar.xz
Ajout de commentaire sur les menbres public
Diffstat (limited to 'Ivy/IvyClient.cs')
-rw-r--r--Ivy/IvyClient.cs48
1 files changed, 36 insertions, 12 deletions
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);
}
+ /// <summary>
+ /// the client application Name
+ /// </summary>
public String ApplicationName
{
get
@@ -68,6 +71,9 @@ namespace IvyBus
}
}
+ /// <summary>
+ /// adress of the client
+ /// </summary>
public IPAddress RemoteAddress
{
get
@@ -76,6 +82,9 @@ namespace IvyBus
}
}
+ /// <summary>
+ /// port of the client
+ /// </summary>
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);
}
-
-
-
+
+
+
+ /// <summary>
+ /// return full Application name pair
+ /// </summary>
public override String ToString()
{
return Resources.IvyClient+ " " + bus.appName + ":" + appName;
@@ -587,6 +607,9 @@ namespace IvyBus
}
Ivy.traceProtocol(Resources.IvyClient,Resources.PingerThreadStopped);
}
+ /// <summary>
+ /// stop the pinger Thread
+ /// </summary>
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.