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

/include/ZE_ZClient.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_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 } //namespace ZE
00129 
00130 #endif //USE_SDL_NET
00131 
00132 #endif //__ze_zclient_h__

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