Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

/include/ZE_ZServer.h

Go to the documentation of this file.
00001 /*******************************************************************************
00002         This file is Part of the ZEngine Library for 2D game development.
00003                    Copyright (C) 2002, 2003 James Turk
00004 
00005                      Licensed under a BSD-style license.
00006 
00007     The maintainer of this library is James Turk (james@conceptofzero.net) 
00008      and the home of this Library is http://www.zengine.sourceforge.net
00009 *******************************************************************************/
00010 
00020 #ifndef __ze_zserver_h__
00021 #define __ze_zserver_h__
00022 
00023 #include "ZE_ZEngine.h"
00024 
00025 #ifdef USE_SDL_NET
00026 
00027 namespace ZE
00028 {
00029 
00037 class ZServer
00038 {
00039     private:
00041         ZEngine *rEngine;
00043         TCPsocket rSocket;
00045         SDLNet_SocketSet rSocketSet;
00047         TCPsocket *rClientSockets;
00049         int rMaxClients;
00051         bool rVerbose;
00053         int rWaitTime;
00054 
00061         void CloseSocket(int num);
00062 
00063     public:
00070         ZServer(bool verbose=false);
00071 
00077         virtual ~ZServer();
00078 
00087         bool Start(int maxClients, Uint16 port);
00088 
00094         void Stop();
00095 
00103         void SetWaitTime(int wait);
00104 
00111         void CheckSockets();
00112 
00119         int Clients();
00120 
00127         int WaitTime();
00128 };
00129 
00130 } //namespace ZE
00131 
00132 #endif //USE_SDL_NET
00133 
00134 #endif //__ze_zserver_h__

Generated on Sun Jun 29 14:13:51 2003 for ZEngine by doxygen1.3