00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00020 #ifndef __ze_zclient_h__
00021 #define __ze_zclient_h__
00022 
00023 #include "ZE_ZEngine.h"
00024 
00025 #ifdef USE_SDL_NET
00026 
00027 namespace ZE
00028 {
00029 
00036 class ZClient
00037 {
00038     protected:
00040         ZEngine *rEngine;
00042         TCPsocket rSocket;
00044         SDLNet_SocketSet rSocketSet;
00046         bool rVerbose;
00048         int rWaitTime;
00049 
00050     public:
00057         ZClient(bool verbose=false);
00058 
00064         virtual ~ZClient();
00065 
00074         bool Connect(char *server, Uint16 port);
00075 
00081         void Disconnect();
00082 
00090         void SetWaitTime(int wait);
00091 
00100         bool Send(ZByte *data, int size);
00101 
00109         int Receive(ZByte *data);
00110 
00117         bool Connected();
00118 
00125         int WaitTime();
00126 };
00127 
00128 } 
00129 
00130 #endif //USE_SDL_NET
00131 
00132 #endif //__ze_zclient_h__