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); } }