From 7b74c7e94ffd19ac99bdfe9a0f6a50d9db067459 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:50:13 +0000 Subject: Utilisateur : Fcolin Date : 10/02/06 Heure : 16:37 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 11) --- CSharp/Ivy/Ivy/IvyTCPStreamV3.cs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/Ivy/IvyTCPStreamV3.cs b/CSharp/Ivy/Ivy/IvyTCPStreamV3.cs index ab1de39..d44bd38 100644 --- a/CSharp/Ivy/Ivy/IvyTCPStreamV3.cs +++ b/CSharp/Ivy/Ivy/IvyTCPStreamV3.cs @@ -11,7 +11,7 @@ namespace IvyBus /// /// Description résumée de IvyStream. /// - internal class IvyTCPStreamV3 : IvyTCPStream + internal class IvyTCPStreamV3 : NetworkStream, IvyProtocol { StreamReader input; StreamWriter output; @@ -24,9 +24,9 @@ namespace IvyBus internal IvyTCPStreamV3(Socket socket, IvyProtocol _receiver) : base ( socket ) { - output = new StreamWriter(stream, Encoding.ASCII); + output = new StreamWriter(this, Encoding.ASCII); output.NewLine = MSG_END.ToString(); - input = new StreamReader(stream, Encoding.ASCII); + input = new StreamReader(this, Encoding.ASCII); receiver = _receiver; } /* the protocol magic numbers */ @@ -63,55 +63,55 @@ namespace IvyBus output.Write( MSG_END); output.Flush(); } - internal override void TokenStartRegexp(ushort port, string appName) + void IvyProtocol.TokenStartRegexp(ushort port, string appName) { sendMsg(MessageType.StartRegexp, port, appName); } - internal override void TokenEndRegexp() + void IvyProtocol.TokenEndRegexp() { sendMsg(MessageType.EndRegexp, 0, ""); } - internal override void TokenApplicationId(ushort priority, string appId) + void IvyProtocol.TokenApplicationId(ushort priority, string appId) { // NOt implemented in this protocol version } - internal override void TokenAddBinding(Ivy.ApplicationBinding bind) + void IvyProtocol.TokenAddBinding(Ivy.ApplicationBinding bind) { // 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 */ } - internal override void TokenDelBinding(ushort id) + void IvyProtocol.TokenDelBinding(ushort id) { sendMsg(MessageType.DelBinding, id, ""); } - internal override void TokenDirectMsg(ushort id, string message) + void IvyProtocol.TokenDirectMsg(ushort id, string message) { sendMsg(MessageType.DirectMsg, id, message); } - internal override void TokenPong(string s) + void IvyProtocol.TokenPong(string s) { sendMsg(MessageType.Pong, 0, s); } - internal override void TokenPing(string s) + void IvyProtocol.TokenPing(string s) { sendMsg(MessageType.Ping, 0, s); } - internal override void TokenBye(ushort id, string message) + void IvyProtocol.TokenBye(ushort id, string message) { sendMsg(MessageType.Bye, id, message); } - internal override void TokenDie(ushort id, string message) + void IvyProtocol.TokenDie(ushort id, string message) { sendMsg(MessageType.Die, id, message); } - internal override void TokenMsg(ushort key, string[] args) + void IvyProtocol.TokenMsg(ushort key, string[] args) { string delimiter = "" + ARG_END; string data = string.Join(delimiter, args); @@ -121,7 +121,7 @@ namespace IvyBus sendMsg(MessageType.Msg, key, data); } - internal override void TokenError(ushort key, string arg) + void IvyProtocol.TokenError(ushort key, string arg) { sendMsg(MessageType.Msg, key, arg); } @@ -160,7 +160,7 @@ namespace IvyBus return str.ToString(); } - internal override bool receiveMsg() + bool IvyProtocol.receiveMsg() { Ivy.ApplicationBinding bind = new Ivy.ApplicationBinding(); MessageType msgType = MessageType.Die; -- cgit v1.1