I have a c++ client that communicates with a service on a small network. I am trying to let the user find the IP address of the service by sending a message to a broadcast IP address, to which my service will respond, etc. I don't think I am doing this correctly, however...
The IP of the service is 192.168.1.102
The subnet mask is 255.255.255.0
As far as I could tell, the corresponding broadcast would be 192.168.1.255, is that right? Well, when I try to connect() to that IP address, it always comes back with errno 13 Permission denied. Does anyone have any idea why this is happening or better yet how I can properly send out one single message to every IP my service could possibly be on?