From 1511a622ce37f82cb0c248d221685d9f033eaa9c Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:06:05 +0000 Subject: Utilisateur : Fcolin Date : 22/12/05 Heure : 17:48 Archivé dans $/CSharp/Ivy/IvyProbe Commentaire: (vss 8) --- CSharp/Ivy/IvyProbe/IvyProbe.cs | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/IvyProbe/IvyProbe.cs b/CSharp/Ivy/IvyProbe/IvyProbe.cs index 4ce78d1..f61d655 100644 --- a/CSharp/Ivy/IvyProbe/IvyProbe.cs +++ b/CSharp/Ivy/IvyProbe/IvyProbe.cs @@ -15,23 +15,12 @@ namespace IvyProbe public IvyProbe() { - //TEST of formatter - try - { - FileStream fs = new FileStream("DataFile.dat", FileMode.Create); - IvyTCPMessage msg = new IvyTCPMessage(IvyTCPMessage.MessageType.Msg, 2, new IvyArgument("pipo")); - IvyTCPFormatter formatter = new IvyTCPFormatter(); - formatter.Serialize(fs, msg); - fs.Close(); - }catch(Exception) - { - } // // Requis pour la prise en charge du Concepteur Windows Forms // InitializeComponent(); - bus = new Ivy("C# TESTBUS", "Testbus ready",this); + bus = new Ivy("IvyProbe_C#", "IvyProbe_C# ready", this); bus.Debug = true; bus.clientConnected += new Ivy.ClientConnectedHandler( connect ); bus.clientDisconnected += new Ivy.ClientDisconnectedHandler( disconnect ); @@ -59,13 +48,13 @@ namespace IvyProbe { append(client.ApplicationName + " disconnected "); } - private bool die(IvyClient client, int id) + private bool die(IvyClient client, int id, string message) { - append("receive die from "+client.ApplicationName ); + append("receive die from "+client.ApplicationName+" cause: "+message ); // return true terminate the application return false; } - private void directMessage(IvyClient client, int id, IvyArgument arg) + private void directMessage(IvyClient client, int id, string arg) { append(client.ApplicationName + " direct Message " + id + arg); } @@ -88,12 +77,12 @@ namespace IvyProbe tbRegexp.Text = ""; append( "bind("+regexp_id+") ->"+expression); } - private void receive(IvyClient client, IvyArgument args) + private void receive(IvyClient client, string[] args) { string receive_str = "client " + client.ApplicationName + " envoie: ["; - for (int i = 0; i < args.Count; i++) + for (int i = 0; i < args.Length; i++) { - receive_str += args[i].Value+ ","; + receive_str += args[i]+ ","; } receive_str = receive_str.TrimEnd(new char[] { ',' }); receive_str += "]"; -- cgit v1.1