diff --git a/addons/ofxOsc/src/ofxOscReceiver.cpp b/addons/ofxOsc/src/ofxOscReceiver.cpp index fbf291605f0..38aa1b4e8c5 100644 --- a/addons/ofxOsc/src/ofxOscReceiver.cpp +++ b/addons/ofxOsc/src/ofxOscReceiver.cpp @@ -28,7 +28,7 @@ ofxOscReceiver& ofxOscReceiver::copy(const ofxOscReceiver &other){ } //-------------------------------------------------------------- -bool ofxOscReceiver::setup(int port, std::string host) { +bool ofxOscReceiver::setup(std::string host, int port) { if(listenSocket){ // already running stop(); } diff --git a/addons/ofxOsc/src/ofxOscReceiver.h b/addons/ofxOsc/src/ofxOscReceiver.h index 83c3ff8d619..d3d906303d4 100644 --- a/addons/ofxOsc/src/ofxOscReceiver.h +++ b/addons/ofxOsc/src/ofxOscReceiver.h @@ -31,15 +31,24 @@ class ofxOscReceiver : public osc::OscPacketListener { /// for operator= and copy constructor ofxOscReceiver& copy(const ofxOscReceiver &other); - /// set up the receiver with the port (and specific host/ip) to listen for messages on - /// and start listening - /// - /// multiple receivers can share the same port if port reuse is - /// enabled (true by default) - /// - /// \return true if listening started - bool setup(int port, std::string host = "0.0.0.0"); - + /// set up the receiver to listen for messages through any hosts on the given port + /// and start listening + /// + /// multiple receivers can share the same port if port reuse is + /// enabled (true by default) + /// + /// \return true if listening started + bool setup(int port) { return setup( "0.0.0.0", port); } + + /// set up the receiver to listen for messages on the specific host/ip + /// and start listening + /// + /// multiple receivers can share the same port if port reuse is + /// enabled (true by default) + /// + /// \return true if listening started + bool setup(std::string host, int port); + /// set up the receiver with the given settings /// /// starts listening if start is true (true by default)