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

server.h

Go to the documentation of this file.
00001 
00010 #ifndef SERVER_H
00011 #define SERVER_H
00012 
00013 #include "connection.h"
00014 
00016 //##ModelId=3ED44BF10181
00017 typedef list<Connection*> ConnList;
00018 
00034 //##ModelId=3ED44BF101B2
00035 class Server {
00036 public:
00037   //##ModelId=3ED44BF10311
00038   static Server* Instance();
00039   //##ModelId=3ED44BF10313
00040   bool Boot(unsigned short port);
00041   //##ModelId=3ED44BF1031C
00042   void Run();
00043   //##ModelId=3ED44BF10325
00044   static void Destroy();
00045 private:
00046   //##ModelId=3ED44BF10327
00047   Server();
00048   //##ModelId=3ED44BF1032F
00049   ~Server();
00050   //##ModelId=3ED44BF10330
00051   Server(const Server&);
00052   //##ModelId=3ED44BF1033A
00053   Server& operator= (const Server&);
00054 
00055   //##ModelId=3ED44BF102A6
00056   static Server* sInstance;  
00057   //##ModelId=3ED44BF102B7
00058   bool   mShutdown;          
00059   //##ModelId=3ED44BF102C1
00060   fd_set mInputFDs;          
00061   //##ModelId=3ED44BF102CB
00062   fd_set mOutputFDs;         
00063   //##ModelId=3ED44BF102DF
00064   SOCKET mAcceptor;          
00065   //##ModelId=3ED44BF102E9
00066   struct sockaddr_in mTo;    
00067   //##ModelId=3ED44BF102FE
00068   ConnList mUsers;           
00069 
00070   //##ModelId=3ED44BF10344
00071   Connection* AcceptConnection();
00072   //##ModelId=3ED44BF1034D
00073   void InitFDs ();
00074   //##ModelId=3ED44BF1034E
00075   void Execute();
00076   //##ModelId=3ED44BF10357
00077   void ShutdownServer();
00078 };
00079 
00080 #endif // SERVER_H
00081 
00082 

Generated on Mon Mar 29 22:38:41 2004 for Paradigm by doxygen1.2.17