diff options
author | fcolin | 2007-02-01 10:06:05 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 10:06:05 +0000 |
commit | 1511a622ce37f82cb0c248d221685d9f033eaa9c (patch) | |
tree | 836dce211c6b18186318cfd2977cc568807094cf /CSharp/Ivy/IvyProbe/IvyProbe.cs | |
parent | 1e37b9084e3df6dd62b6e246820ea134d8481b90 (diff) | |
download | ivy-csharp-1511a622ce37f82cb0c248d221685d9f033eaa9c.zip ivy-csharp-1511a622ce37f82cb0c248d221685d9f033eaa9c.tar.gz ivy-csharp-1511a622ce37f82cb0c248d221685d9f033eaa9c.tar.bz2 ivy-csharp-1511a622ce37f82cb0c248d221685d9f033eaa9c.tar.xz |
Utilisateur : Fcolin Date : 22/12/05 Heure : 17:48 Archivé dans $/CSharp/Ivy/IvyProbe Commentaire: (vss 8)
Diffstat (limited to 'CSharp/Ivy/IvyProbe/IvyProbe.cs')
-rw-r--r-- | CSharp/Ivy/IvyProbe/IvyProbe.cs | 25 |
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 += "]";
|