summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-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: