- Main Page
- Classes
- Files

- Search for |

# RemoteUDPServer.h

Go to the documentation of this file.

    00001 /*****************************
    00002 File:     RemoteUDPServer.h
    00003 Language:   C++ (header)
    00004 Project:    H3DNetworkingUtils
    00005 The contents of this file are subject to the Mozilla Public License
    00006 Version 1.1 (the "License"); you may not use this file except in
    00007 compliance with the License. You may obtain a copy of the License at
    00008 http://www.mozilla.org/MPL/
    00009
    00010 Software distributed under the License is distributed on an "AS IS"
    00011 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
    00012 License for the specific language governing rights and limitations
    00013 under the License.
    00014
    00015 The Original Code is H3DNetworkingUtils v1.0.
    00016
    00017 The Initial Developer of the Original Code is CSIRO.
    00018 Portions created by the Initial Developer are Copyright (C) 1009 CSIRO. All Rights Reserved.
    00019 Contributor(s):
    00020     Chris Gunn  <Chris.Gunn@csiro.au> <ChrisJGunn@gmail.com>
    00021 ***************************/
    00022
    00025
    00026 #ifndef RemoteUDPServer_H
    00027 #define RemoteUDPServer_H
    00028
    00029
    00030 #include "H3DNetworkingUtils/RemoteServer.h"
    00031 #include "H3DNetworkingUtils/lockwrap.h"
    00032
    00033 namespace H3DNetworkingUtils {
    00034
    00047
    00055
    00061
    00062 class H3D_NETWORKING_UTILS_DLL_SPEC RemoteUDPServer : public RemoteServer {
    00063 public:
    00064
    00066    RemoteUDPServer();
    00067
    00069    virtual ~RemoteUDPServer();
    00070
    00072   static H3D::H3DNodeDatabase database;
    00073
    00074 protected:
    00075
    00077   virtual void sendThisPacket(Packet & packet);
    00078
    00080   virtual void receiveLoop ();
    00081
    00083   virtual void sendLoop();
    00084
    00086   virtual void startServer(int port_number);
    00087
    00088 private:
    00089   InetAddr remote_end;
    00090   Packet pulse_packet;
    00091   Mutex send_packet_lock;
    00092   double accumulated_time_to_kill;
    00093 };
    00094
    00095 }
    00096
    00097 #endif