If i start two instances of JUCE-Demo, one as listener, another as sender on the same computer (with Socket Host “localhost”) , the connection couldn’t be established.
if these instances are on different computers it works (in both directions!, so i guess it has nothing to do with the internal windows firewall)
I experienced the same issue with using the OSCSender class, which I assume has the same socket implementation underneath. Can’t send messages to “localhost”, but “127.0.0.1” works fine. Any suggestions?
My understanding is that this only relates to the “service”, i.e. port number. I’ve certainly used getAddressInfo with a hostName that isn’t an IP address and it worked fine.
I responded to your reply, but realized I misread it. So, to clarify, you’ve used the JUCE function getAddressInfo with a non-numerical host-name or you’ve done so with the low level getaddrinfo?
And, if that is the case, I recommend using a debugger to see where things are failing. Drop a breakpoint in getAddressInfo and see where things go wrong. And/or, for further testing verification, remove the hints.ai_flags = AI_NUMERICSERV; line and see if that makes a difference. I did see some references online that Windows tends to return ::1 for localhost, but I’m not sure how that would effect things.
Thanks for the reply. When I get I chance I’ll need to do some debugging of this. I was hoping that someone more expert than me in this area would just know
I’m running into the problem using the Juce OSC module. I happen to know that the getaddrinfo gets IPs from hostnames because I’ve used it elsewhere in my code.