diff --git a/src/osgPlugins/osc/OscDevice.cpp b/src/osgPlugins/osc/OscDevice.cpp index 66e6f8659..92bbbb19f 100755 --- a/src/osgPlugins/osc/OscDevice.cpp +++ b/src/osgPlugins/osc/OscDevice.cpp @@ -397,6 +397,22 @@ void OscDevice::ProcessMessage( const osc::ReceivedMessage& m, const IpEndpointN } +void OscDevice::ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint ) +{ + OSG_INFO << "OscDevice :: receiving " << size << " bytes of data ..." << std::endl; + + try { + osc::OscPacketListener::ProcessPacket(data, size, remoteEndpoint); + } + catch(const osc::Exception& e) { + OSG_WARN << "OscDevice :: could not process UDP-packet: " << e.what() << std::endl; + } + catch(...) { + OSG_WARN << "OscDevice :: could not process UDP-packet because of an exception!" << std::endl; + } + +} + void OscDevice::addRequestHandler(RequestHandler* handler) { if (handler) diff --git a/src/osgPlugins/osc/OscDevice.hpp b/src/osgPlugins/osc/OscDevice.hpp index 95f3797ff..a8e1e7144 100755 --- a/src/osgPlugins/osc/OscDevice.hpp +++ b/src/osgPlugins/osc/OscDevice.hpp @@ -70,6 +70,7 @@ public: virtual void run(); virtual void ProcessMessage( const osc::ReceivedMessage& m, const IpEndpointName& remoteEndpoint ); + virtual void ProcessPacket( const char *data, int size, const IpEndpointName& remoteEndpoint ); void addRequestHandler(RequestHandler* handler);