summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
authorfcolin2007-02-01 10:01:34 +0000
committerfcolin2007-02-01 10:01:34 +0000
commiteaaf9b0f857f99b0dadb008b8ce04a38c6b68676 (patch)
treed624ca699c71abda39ec540dd50cbe0a39b90874 /CSharp/Ivy/IvyPPC
parentba503541f07c246f8cb4bf7d4f76a8ff22c0cae8 (diff)
downloadivy-csharp-eaaf9b0f857f99b0dadb008b8ce04a38c6b68676.zip
ivy-csharp-eaaf9b0f857f99b0dadb008b8ce04a38c6b68676.tar.gz
ivy-csharp-eaaf9b0f857f99b0dadb008b8ce04a38c6b68676.tar.bz2
ivy-csharp-eaaf9b0f857f99b0dadb008b8ce04a38c6b68676.tar.xz
Utilisateur : Fcolin Date : 19/12/05 Heure : 16:54 Créé Commentaire: (vss 1)
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyTCPStream.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStream.cs b/CSharp/Ivy/IvyPPC/IvyTCPStream.cs
new file mode 100644
index 0000000..3e2eebf
--- /dev/null
+++ b/CSharp/Ivy/IvyPPC/IvyTCPStream.cs
@@ -0,0 +1,46 @@
+using System;
+using System.Collections.Specialized;
+using System.Text;
+using System.Net;
+using System.Net.Sockets;
+using System.IO;
+
+namespace IvyBus
+{
+ abstract class IvyTCPStream : IvyProtocolInterface
+ {
+ protected NetworkStream stream;
+
+ public IvyTCPStream(Socket socket)
+ {
+ //stream = new BufferedStream(new NetworkStream(socket,true));
+ stream = new NetworkStream(socket, true);
+ }
+ internal void Close()
+ {
+ stream.Close();
+ }
+ abstract internal bool receiveMsg();
+
+ abstract public void TokenStartRegexp(ushort port, string appName);
+
+ abstract public void TokenEndRegexp();
+ abstract public void TokenApplicationId(ushort priority, string appId);
+
+ abstract public void TokenAddRegexp(ushort id, string bind);
+ abstract public void TokenAddBinding(ushort id, string bind);
+
+ abstract public void TokenDelBinding(ushort id);
+
+ abstract public void TokenDirectMsg(ushort id, string message);
+ abstract public void TokenPong(string s);
+ abstract public void TokenPing(string s);
+
+ abstract public void TokenBye(ushort id, string message);
+ abstract public void TokenDie(ushort id, string message);
+
+ abstract public void TokenMsg(ushort key, string[] args);
+
+ abstract public void TokenError(ushort key, string arg);
+ }
+}