Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion addons/ofxOsc/src/ofxOscReceiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
27 changes: 18 additions & 9 deletions addons/ofxOsc/src/ofxOscReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down