00001 /* 00002 * $Id: ServerSocket.h,v 1.5 2003/06/12 13:34:54 mindstorm2600 Exp $ 00003 */ 00004 #ifndef __CLAW_SERVER_SOCKET_H__ 00005 #define __CLAW_SERVER_SOCKET_H__ 00006 #ifndef UNIX_SOCKETS 00007 #include <SDL_net.h> 00008 #endif 00009 00010 #include"Socket.h" 00011 00012 namespace clawsoft{ 00016 class ServerSocket:public SocketBase{ 00017 protected: 00018 /***********************************************/ 00019 #ifndef UNIX_SOCKETS 00020 TCPsocket tcpsock_server; 00021 SDLNet_SocketSet socketset ; 00022 #endif 00023 /***********************************************/ 00027 int CreateSocket(const int theport, const int m = 256); 00030 int maxConn; 00031 public: 00034 ServerSocket(const int pport, const int m = 256); 00037 virtual ~ServerSocket(){ 00038 close(); 00039 } 00042 virtual Socket *accept(); 00044 virtual void close(); 00046 const int getPort(){ 00047 return port; 00048 } 00049 }; 00050 } //end of namespace directive 00051 00052 #endif
Authors:
Juan V. Guerrero
Jannette C. Mejia
Juan C. Guevara
Powered by: