00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00024 #ifndef __ze_zclient_h__
00025 #define __ze_zclient_h__
00026 
00027 #include "ZE_ZEngine.h"
00028 
00029 #ifdef USE_SDL_NET
00030 
00031 namespace ZE
00032 {
00033 
00040 class ZClient
00041 {
00042     protected:
00044         ZEngine *rEngine;
00046         TCPsocket rSocket;
00048         SDLNet_SocketSet rSocketSet;
00050         bool rVerbose;
00052         int rWaitTime;
00053 
00054     public:
00061         ZClient(bool verbose=false);
00062 
00068         virtual ~ZClient();
00069 
00078         bool Connect(char *server, Uint16 port);
00079 
00085         void Disconnect();
00086 
00094         void SetWaitTime(int wait);
00095 
00104         bool Send(ZByte *data, int size);
00105 
00113         int Receive(ZByte *data);
00114 
00121         bool Connected();
00122 
00129         int WaitTime();
00130 };
00131 
00132 } 
00133 
00134 #endif //USE_SDL_NET
00135 
00136 #endif //__ze_zclient_h__