Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

connection.h

Go to the documentation of this file.
00001 
00008 #ifndef CONNECTION_H
00009 #define CONNECTION_H
00010 
00020 class Socket;
00021 class Server;
00022 
00023 class Connection {
00024 public:
00025   Connection(SOCKET sock, Server* server);
00026   virtual ~Connection();
00027   Connection(const Connection& r_conn);
00028   bool operator==(const Connection& r_conn) const;
00029 
00030   virtual void HandleInput();
00031   virtual void HandleOutput();
00032   virtual bool CanBeDisconnected();
00033   virtual bool HasOutput();
00034   virtual void Disconnect();
00035   virtual void SendMsg(const string& r_msg);
00036   virtual string* ReadMsg();
00037   virtual SOCKET GetSocket() const;
00038 protected:
00039   Connection& operator=(const Connection& r_conn);
00040   Server * mServer;         
00041   Socket * mSock;           
00042   bool mDisconnectable;     
00043   list<string> mInBuffer;   
00044   list<string> mOutBuffer;  
00045   string mPendingInput;     
00046 };
00047 
00048 #endif // CONNECTION_H

Generated on Mon Mar 29 23:12:52 2004 for Paradigm by doxygen1.2.17