00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00025
00026 #ifndef RemoteUDPClient_H
00027 #define RemoteUDPClient_H
00028
00029
00030 #include "H3DNetworkingUtils/RemoteClient.h"
00031 #include "H3DNetworkingUtils/lockwrap.h"
00032
00033 namespace H3DNetworkingUtils {
00034
00052
00053 class H3D_NETWORKING_UTILS_DLL_SPEC RemoteUDPClient : public RemoteClient {
00054 public:
00055
00057 static const H3D::H3DFloat PULSE_PERIOD;
00058
00060 RemoteUDPClient();
00061
00063 virtual ~RemoteUDPClient();
00064
00066 static H3D::H3DNodeDatabase database;
00067
00068 protected:
00070 virtual void sendThisPacket(Packet & packet);
00071
00073 virtual void restartClient();
00074
00076 virtual void receiveLoop();
00077
00079 virtual void sendLoop();
00080
00082 virtual void requestClose();
00083
00084 private:
00085 Packet pulse_packet;
00086 char ack[20];
00087 int msg_count;
00088 bool connect_requested;
00089 Mutex send_packet_lock;
00090 double accumulated_time_to_kill;
00091 };
00092
00093 }
00094
00095 #endif