diff options
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyClient.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs index 4035b2a..2244b17 100644 --- a/CSharp/Ivy/IvyPPC/IvyClient.cs +++ b/CSharp/Ivy/IvyPPC/IvyClient.cs @@ -204,7 +204,7 @@ namespace IvyBus /// <param name="message">the string that will be match-tested
///
/// </param>
- internal void sendDirectMsg(int id, String message)
+ public void sendDirectMsg(int id, String message)
{
send(MessageType.DirectMsg, id, message);
}
@@ -299,6 +299,8 @@ namespace IvyBus // early stop during readLine()
if (doping && (pingerThread != null))
pingerThread.Interrupt();
+ if ( msg.Length == 0 )
+ Console.Error.WriteLine("Should close");
newParseMsg(msg);
}
else
@@ -312,12 +314,20 @@ namespace IvyBus Console.Error.WriteLine( ie.Message );
Console.Error.WriteLine( ie.StackTrace);
running = false;
+ break;
}
catch (IOException e)
{
- traceDebug("abnormally Disconnected from " + RemoteAddress + ":" + RemotePort);
- Console.Error.WriteLine( e.Message );
- Console.Error.WriteLine( e.StackTrace);
+ if ( e.InnerException is SocketException )
+ {
+
+ }
+ else
+ {
+ traceDebug("abnormally Disconnected from " + RemoteAddress + ":" + RemotePort);
+ Console.Error.WriteLine( e.Message );
+ Console.Error.WriteLine( e.StackTrace);
+ }
running = false;
break;
}
@@ -571,7 +581,7 @@ namespace IvyBus {
send(MessageType.Pong, 0, s);
}
- private void sendPing(String s)
+ public void sendPing(String s)
{
send(MessageType.Ping, 0, s);
}
@@ -585,7 +595,7 @@ namespace IvyBus send(MessageType.Bye, 0, message);
}
- private void sendDie()
+ public void sendDie()
{
send(MessageType.Die, 0, "");
}
|