networking

I think you are looking for something like the TCP RendezVous in panda library.

The TCP RendezVous is dedicated to receive connection attempt on a specific port on the “server”

When it receive a connection attempt it call a callback where you can accept the connection and add it to your active connections
(see in manual)
You can then send an aknowledgement from the server telling the client “OK you are in”
=> it’s a stripped down handshake system between your 2 computers…

The TCP Rendez vous is a kind of background tasK