00001
00002 #ifndef _H_SOCKET_H_
00003 #define _H_SOCKET_H_
00004
00005 void random_wait();
00006
00007
00008 class HSocServer
00009 {
00010 public:
00011 HSocServer(short portno);
00012 ~HSocServer();
00013 int Recieve(void* buffer, int size, int *id);
00014 bool Send(void* buffer, int size, int id);
00015 bool Broadcast(void* buffer, int size);
00016 private:
00017 int s;
00018 };
00019
00020 class HSocClient
00021 {
00022 public:
00023 HSocClient(const char *servername, short portno);
00024 ~HSocClient();
00025 void SetBlocking(bool IsBlocking);
00026 int Recieve(void* buffer, int size);
00027 bool Send(void* buffer, int size);
00028 private:
00029 int s;
00030 };
00031
00032 #endif //_H_SOCKET_H_