summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 10:02:03 +0000
committerfcolin2007-02-01 10:02:03 +0000
commit779c3a6a93a888ef6c958e1b88624fe1a255a731 (patch)
treeb0b3050a4a039c5d05995840b63063353758336f
parent49ba387f63b5f4251954cc553e980709c9823bc5 (diff)
downloadivy-csharp-779c3a6a93a888ef6c958e1b88624fe1a255a731.zip
ivy-csharp-779c3a6a93a888ef6c958e1b88624fe1a255a731.tar.gz
ivy-csharp-779c3a6a93a888ef6c958e1b88624fe1a255a731.tar.bz2
ivy-csharp-779c3a6a93a888ef6c958e1b88624fe1a255a731.tar.xz
Utilisateur : Fcolin Date : 10/02/06 Heure : 16:37 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 11)
-rw-r--r--CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs32
1 files changed, 16 insertions, 16 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
index ab1de39..d44bd38 100644
--- a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
+++ b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs
@@ -11,7 +11,7 @@ namespace IvyBus
/// <summary>
/// Description résumée de IvyStream.
/// </summary>
- 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;