How can a Server request to connect to a Client using the Client IP address?

My program uses NetworkDiscovery to find all the clients in the vicinity.
The server then stores the clients address and then disconnects. I end up with a list of clients and their network info.
How can the Server now Choose one of those clients, by their IP, and open up a connection to them? To make my question more clear, I want the Server to ask an IP address to connect to it.
Any help would be greatly appreciated.
Thanks!

It can’t. In the client server model, the client always initiates the connection. But once the connection is established, it does matter who sends the data and who listen, the order is up to you (or to your protocol) .

Also, you could simply force the clients to connect to the server on startup, then just idle until the server has something to ask them to do.


AI Scripting - Panda BT: Behaviour Tree scripting for Unity.