As on the client using a broadcast request to find the server (Winsock)?

There is a server on the PC, then start the client (All UDP). How to make a network broadcast to find the server to get its ip (well, there is and in any case I think) and the port to fill the structure :
RecvAddr.sin_family was = AF_INET;
RecvAddr.sin_port = htons(Port);
RecvAddr.sin_addr.s_addr = inet_addr("");

continue to communicate with this server. Plan to run multiple servers and select one of them for farther communication.
April 19th 20 at 12:19
1 answer
April 19th 20 at 12:21
The client sends a broadcast (SO_BROADCAST) "package Server, ay!" on the broadcast address of the network.
The server receives such a request sends directly to the client package "Auski?"
The client received a response from the server remembers the address of the sender.
If answered multiple servers, the client chooses.

Find more questions by tags C++SocketsUDP