I’d like to allow other plugins within the same host to send data to my plugin.
For that I want to use a simple UDP socket bound to 127.0.0.1 and a defined port (I picked 6419).
For some reason though the DatagramSocket::waitUntilReady always returns -1.
I setup a test app to isolate the problem.
These are three lines of code so there’s not a lot that I can be doing wrong
What’s going on? Can this be a permission thing or something?
Using Xcode 10 on Mojave 10.14.5.
LittleSnitch is installed but turned off, Firewall is disabled as well.
Bump. Sorry guys, I have no idea why such a simple thing could fail and I don’t know what else I could try. Tried it on two machines, both running Mojave, same result.
You have two different port numbers in your code: 6419 and 6519…
Anyway it’s better to test it in the opposite way: a receiver should listen in a separate thread and then a sender can be triggered by a button click or a timer from the main thread. In your example you are blocking everything with while (true) loop…