I am currently struggling with a basic socket problem using boost :: asio. The server sends broadcasts on my local network to open client computers. The broadcast is successfully read on the client, but now I'm stuck on the question of how to get the IP address of the server in order to be able to establish a regular connection with it.
I tried to query the remote endpoint after receiving the broadcast, but of course I get 0.0.0.0. Same thing for querying the local endpoint before sending the broadcast to the server (I would send the IP address of the server in the broadcast, then)
So what is the default procedure to get the broadcast sender address?
Thank:)
source
share