diff options
-rw-r--r-- | CSharp/Ivy/IvyPPC/IvyClient.cs | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs index 547875c..649ea80 100644 --- a/CSharp/Ivy/IvyPPC/IvyClient.cs +++ b/CSharp/Ivy/IvyPPC/IvyClient.cs @@ -94,7 +94,7 @@ namespace IvyBus // protected variables
internal String appName;
- internal IvyTCPStream stream;
+ internal IvyProtocol stream;
internal IvyClient(Ivy bus, Socket socket, string appname)
{
@@ -348,9 +348,16 @@ namespace IvyBus bus.removeClient(this);
}
-
-
- override internal void TokenDie(ushort id, string arg)
+ void IvyProtocol.Close()
+ {
+ // never call in this side
+ }
+ bool IvyProtocol.receiveMsg()
+ {
+ // nerver call in this side
+ return false;
+ }
+ void IvyProtocol.TokenDie(ushort id, string arg)
{
traceDebug("received die Message from " + appName + "Raison: "+ arg);
// invokes the die applicationListeners
@@ -363,7 +370,7 @@ namespace IvyBus if (killapp == Ivy.ApplicationExit.FORCE_EXIT)
System.Windows.Forms.Application.Exit();
}
- override internal void TokenBye(ushort err, string arg)
+ void IvyProtocol.TokenBye(ushort err, string arg)
{
// the peer quits
traceDebug("received bye Message from " + appName + "Raison: "+ arg);
@@ -374,7 +381,7 @@ namespace IvyBus close(false); // will fire diconnected
}
- override internal void TokenAddBinding(Ivy.ApplicationBinding bind)
+ void IvyProtocol.TokenAddBinding(Ivy.ApplicationBinding bind)
{
try
{
@@ -395,7 +402,7 @@ namespace IvyBus }
}
- override internal void TokenDelBinding(ushort id)
+ void IvyProtocol.TokenDelBinding(ushort id)
{
lock( bindings )
{
@@ -411,16 +418,16 @@ namespace IvyBus }
}
}
- override internal void TokenMsg(ushort id, string[] arg)
+ void IvyProtocol.TokenMsg(ushort id, string[] arg)
{
bus.FireCallback(this, id, arg);
}
- override internal void TokenError(ushort id, string arg)
+ void IvyProtocol.TokenError(ushort id, string arg)
{
bus.FireError(this, id, arg);
traceDebug("Error msg " + id + " " + arg);
}
- override internal void TokenApplicationId(ushort id, string arg)
+ void IvyProtocol.TokenApplicationId(ushort id, string arg)
{
clientId = arg;
if ( clientPriority != id )
@@ -429,7 +436,7 @@ namespace IvyBus bus.SortClients();
}
}
- override internal void TokenEndRegexp()
+ void IvyProtocol.TokenEndRegexp()
{
bus.FireClientConnected(this);
/*
@@ -439,7 +446,7 @@ namespace IvyBus if (bus.ReadyMessage != null)
sendMsg(bus.ReadyMessage);
}
- override internal void TokenStartRegexp(ushort id, string arg)
+ void IvyProtocol.TokenStartRegexp(ushort id, string arg)
{
appName = arg;
appPort = id;
@@ -450,18 +457,18 @@ namespace IvyBus }
}
- override internal void TokenDirectMsg(ushort id, string arg)
+ void IvyProtocol.TokenDirectMsg(ushort id, string arg)
{
bus.FireDirectMessage(this, id, arg );
}
- override internal void TokenPing(string arg)
+ void IvyProtocol.TokenPing(string arg)
{
// I receive a ping. I can answer a pong.
traceDebug("Ping msg from " + appName + " : " + arg );
stream.TokenPong(arg);
}
- override internal void TokenPong(string arg)
+ void IvyProtocol.TokenPong(string arg)
{
traceDebug("Ping msg from " + appName + " : " + arg);
}
|