summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyProbe
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyProbe')
-rw-r--r--CSharp/Ivy/IvyProbe/IvyProbe.cs25
1 files changed, 7 insertions, 18 deletions
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 += "]";