diff options
author | fcolin | 2007-02-01 10:04:34 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 10:04:34 +0000 |
commit | 63a06beae3f8e5495c6d374c8bdcd92d9095453e (patch) | |
tree | 2462c88631e28db8267b950350153b61e4f1a4c9 /CSharp | |
parent | 46e881630f39253aa13ce09986a25da9d84f10cd (diff) | |
download | ivy-csharp-63a06beae3f8e5495c6d374c8bdcd92d9095453e.zip ivy-csharp-63a06beae3f8e5495c6d374c8bdcd92d9095453e.tar.gz ivy-csharp-63a06beae3f8e5495c6d374c8bdcd92d9095453e.tar.bz2 ivy-csharp-63a06beae3f8e5495c6d374c8bdcd92d9095453e.tar.xz |
Utilisateur : Fcolin Date : 13/01/06 Heure : 16:30 Archivé dans $/CSharp/Ivy/IvyPerf Commentaire: (vss 3)
Diffstat (limited to 'CSharp')
-rw-r--r-- | CSharp/Ivy/IvyPerf/IvyPerf.cs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CSharp/Ivy/IvyPerf/IvyPerf.cs b/CSharp/Ivy/IvyPerf/IvyPerf.cs index 82fd010..a25e58a 100644 --- a/CSharp/Ivy/IvyPerf/IvyPerf.cs +++ b/CSharp/Ivy/IvyPerf/IvyPerf.cs @@ -21,10 +21,12 @@ namespace IvyPerf //time = Environment.TickCount;
return time;
}
+ [IvyBinding("^ping ts=(.*)")]
static void Reply(IvyClient client, string[] args)
{
- bus.sendMsg(c,"pong ts={0} tr={1}", args, currentTime());
+ bus.sendMsg(c,"pong ts={0} tr={1}", args[0], currentTime());
}
+ [IvyBinding("^pong ts=(.*) tr=(.*)")]
static void Pong(IvyClient client, string[] args)
{
double current = currentTime();
@@ -42,8 +44,9 @@ namespace IvyPerf {
c = new CultureInfo("en-us");
bus = new Ivy("IvyPerf", "IvyPref ready");
- bus.bindMsg( "^ping ts=(.*)", new Ivy.MessageHandler( Reply ) );
- bus.bindMsg( "^pong ts=(.*) tr=(.*)", new Ivy.MessageHandler( Pong ) );
+ bus.AutoBinding(typeof(IvyPerf));
+ //bus.bindMsg( "^ping ts=(.*)", new Ivy.MessageHandler( Reply ) );
+ //bus.bindMsg( "^pong ts=(.*) tr=(.*)", new Ivy.MessageHandler( Pong ) );
//bus.bindSimpleMsg( "ping:ts", new Ivy.MessageHandler( Reply ) );
//bus.bindSimpleMsg( "pong:ts,tr", new Ivy.MessageHandler( Pong ) );
bus.start(null);
|