Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

NetListener.h

Go to the documentation of this file.
00001 
00010 #ifndef __NETLISTENER_H__
00011 #define __NETLISTENER_H__
00012 
00013 #include <windows.h>
00014 #include <winsock.h>
00015 
00016 #define DEFAULT_PORT    8188
00017 
00018 class NetListener
00019 {
00020 private:
00021     char server_name[64];
00022     unsigned short port;
00023 
00024     WSADATA wsaData;
00025     SOCKET  udp_socket;
00026 
00027 public:
00028     NetListener(int port = DEFAULT_PORT);
00029     ~NetListener();
00030 
00031     bool init();
00032     void cleanup();
00033 
00034     int listenerConnect(unsigned long blocking);   // 0 = blocking,  1 = nonblocking
00035     bool listenerClose();
00036 
00037     bool listenerReceive(char* data,unsigned int bufferSize);
00038 };
00039 
00040 #endif /* __NETLISTENER_H__ */

Generated on Mon Mar 4 08:42:23 2002 for Aria by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002