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 
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 } //namespace ZE
00133 
00134 #endif //USE_SDL_NET
00135 
00136 #endif //__ze_zclient_h__

Generated on Sun Apr 27 22:34:35 2003 for ZEngine by doxygen1.3-rc2