summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r--CSharp/Ivy/Ivy/IvyTCPStreamV4.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/CSharp/Ivy/Ivy/IvyTCPStreamV4.cs b/CSharp/Ivy/Ivy/IvyTCPStreamV4.cs
index 850a41f..ce60a7f 100644
--- a/CSharp/Ivy/Ivy/IvyTCPStreamV4.cs
+++ b/CSharp/Ivy/Ivy/IvyTCPStreamV4.cs
@@ -11,7 +11,7 @@ namespace IvyBus
/// <summary>
/// Description résumée de IvyStream.
/// </summary>
- internal class IvyTCPStreamV4 : IvyTCPStream
+ internal class IvyTCPStreamV4 : NetworkStream , IvyProtocol
{
BinaryReader input;
BinaryWriter output;
@@ -39,8 +39,8 @@ namespace IvyBus
internal IvyTCPStreamV4(Socket socket, IvyProtocol _receiver) : base( socket )
{
- input = new BinaryReader(stream, Encoding.ASCII);
- output = new BinaryWriter(stream, Encoding.ASCII);
+ input = new BinaryReader(this, Encoding.ASCII);
+ output = new BinaryWriter(this, Encoding.ASCII);
receiver = _receiver;
}
@@ -83,20 +83,20 @@ namespace IvyBus
output.Flush();
}
- override internal void TokenStartRegexp(ushort port, string appName)
+ void IvyProtocol.TokenStartRegexp(ushort port, string appName)
{
sendMsg(MessageType.StartRegexp, port, appName);
}
- override internal void TokenEndRegexp()
+ void IvyProtocol.TokenEndRegexp()
{
sendMsg(MessageType.EndRegexp, 0, "");
}
- override internal void TokenApplicationId(ushort priority, string appId)
+ void IvyProtocol.TokenApplicationId(ushort priority, string appId)
{
sendMsg(MessageType.ApplicationId, priority, appId);
}
- override internal void TokenAddBinding(Ivy.ApplicationBinding bind)
+ void IvyProtocol.TokenAddBinding(Ivy.ApplicationBinding bind)
{
if (bind.type == Ivy.BindingType.BindRegexp)
{
@@ -108,40 +108,40 @@ namespace IvyBus
}
}
- override internal void TokenDelBinding(ushort id)
+ void IvyProtocol.TokenDelBinding(ushort id)
{
sendMsg(MessageType.DelBinding, id, null );
}
- override internal void TokenDirectMsg(ushort id, string message)
+ void IvyProtocol.TokenDirectMsg(ushort id, string message)
{
sendMsg(MessageType.DirectMsg, id, message);
}
- override internal void TokenPong(string s)
+ void IvyProtocol.TokenPong(string s)
{
sendMsg(MessageType.Pong, 0, s);
}
- override internal void TokenPing(string s)
+ void IvyProtocol.TokenPing(string s)
{
sendMsg(MessageType.Ping, 0, s);
}
- override internal void TokenBye(ushort id, string message)
+ void IvyProtocol.TokenBye(ushort id, string message)
{
sendMsg(MessageType.Bye, id, message);
}
- override internal void TokenDie(ushort id, string message)
+ void IvyProtocol.TokenDie(ushort id, string message)
{
sendMsg(MessageType.Die, id, message);
}
- override internal void TokenMsg(ushort key, string[] args)
+ void IvyProtocol.TokenMsg(ushort key, string[] args)
{
sendMsg(MessageType.Msg, key, args );
}
- override internal void TokenError(ushort key, string arg)
+ void IvyProtocol.TokenError(ushort key, string arg)
{
sendMsg(MessageType.Msg, key, arg);
}
@@ -183,7 +183,7 @@ namespace IvyBus
}
return arg;
}
- override internal bool receiveMsg()
+ bool IvyProtocol.receiveMsg()
{
Ivy.ApplicationBinding bind = new Ivy.ApplicationBinding();
MessageType msgType = MessageType.Die;