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 127.0.0.1 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("127.0.0.1");
continue to communicate with this server. Plan to run multiple servers and select one of them for farther communication.