I have a problem with AsyncUdpSocket.
I used to connect to a server, send some data and get some response. Now since I do not know the actual address of the server I had
You are 'connecting' to the host. Per the Unix socket FAQ, this means you'll only get UDP packets back that have a source IP address of 255.255.255.255. Connecting establishes a 1-to-1 relationship for UDP, such that received packets whose source addresses differ from the connected address will be filtered.
If you don't connect (you'll have to change your send line to target the broadcast address), it should work. You'll send toHost:bcHost
-- and then your receive should get all packets destined for its port.