ofxOscSender falls back on localhost

#1

I might be missing something, but when providing an unavailable host to ofxOscSender.setup() it falls back to localhost.

While I see this can be useful in some cases (e.g. avoiding throwing errors) this can also be confusing, and above all this prevents from knowing that the connection to the desired host failed.

This can be reproduced by changing "localhost"with e.g. “anything” (which should indeed fail) here

#define HOST "anything"

-> this is still sending to localhost

My fix for that is here:


i.e. returning false if the connection is not reached:

 		if (!name.address) return false;
 		socket = new osc::UdpTransmitSocket(name, settings.broadcast);		 		socket = new osc::UdpTransmitSocket(name, settings.broadcast);

thats on ofxOscSender.cpp:62

There might be cleaner ways to do this, though… and, again, I might have missed something obvious… opinions, anyone ?

#2

pinging @danomatika since you seem to be the author of this part