From 1024eeccd6ef3dda7635f93bf78c557bb1039869 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:57:33 +0000 Subject: Utilisateur : Fcolin Date : 7/07/03 Heure : 11:58 Archivé dans $/EScribe/Ivy Commentaire: (vss 6) --- CSharp/Ivy/IvyPPC/IvyClient.cs | 22 ++++++++++++++++------ 1 file 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 /// the string that will be match-tested /// /// - 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, ""); } -- cgit v1.1