summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 10:02:10 +0000
committerfcolin2007-02-01 10:02:10 +0000
commit8466f7efa5244091a2d897620dd535c542ed61a3 (patch)
treeb802611b76564fa4e0f951f2436e6688829788ce
parent072e6d31ab856b748c0dd7f43c86fe622cbec043 (diff)
downloadivy-csharp-8466f7efa5244091a2d897620dd535c542ed61a3.zip
ivy-csharp-8466f7efa5244091a2d897620dd535c542ed61a3.tar.gz
ivy-csharp-8466f7efa5244091a2d897620dd535c542ed61a3.tar.bz2
ivy-csharp-8466f7efa5244091a2d897620dd535c542ed61a3.tar.xz
Utilisateur : Fcolin Date : 23/06/06 Heure : 11:12 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 15)
-rw-r--r--CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs24
1 files changed, 12 insertions, 12 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
index 259d589..8f41f0c 100644
--- a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
+++ b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
@@ -83,11 +83,17 @@ namespace IvyBus
// NOt implemented in this protocol version
}
- void IvyProtocol.TokenAddBinding(Ivy.ApplicationBinding bind)
+ void IvyProtocol.TokenAddBinding(BindingType type, ushort id, string expression)
{
- // NO Simple Binding in this protocol
- if ( bind.type == Ivy.BindingType.BindRegexp )
- sendMsg(MessageType.AddRegexp, bind.key, bind.expression); /* perhaps we should perform some checking here */
+ switch (type)
+ {
+ case BindingType.Regexp:
+ sendMsg(MessageType.AddRegexp, id, expression); /* perhaps we should perform some checking here */
+ break;
+ case BindingType.Simple:
+ // NO Simple Binding in this protocol
+ break;
+ }
}
void IvyProtocol.TokenDelBinding(ushort id)
@@ -169,7 +175,6 @@ namespace IvyBus
bool IvyProtocol.receiveMsg()
{
- Ivy.ApplicationBinding bind;
MessageType msgType = MessageType.Die;
ushort msgId = 0;
string msgData = null;
@@ -190,13 +195,8 @@ namespace IvyBus
receiver.TokenBye(msgId, msgData);
break;
- case MessageType.AddRegexp:
-
- bind = new Ivy.ApplicationBinding();
- bind.type = Ivy.BindingType.BindRegexp;
- bind.key = msgId;
- bind.expression = msgData;
- receiver.TokenAddBinding(bind);
+ case MessageType.AddRegexp:
+ receiver.TokenAddBinding(BindingType.Regexp, msgId, msgData);
break;
case MessageType.DelBinding: