Differentiating between clients

If two machines are behind a router, can a server send a UDP packet to each machine?

When the server gets a packet, the ip address and port will be the same for both machines (the ip address will be the single ip address their ISP gave them). Is there a way to further distinguish the two machines?

I know commercial games allow multiple players behind one router, any ideas on how this is accomlpished?

hm. i never had any trouble keeping clients apart using panda’s managed connections, but then i only used tcp.
you could have a handshake some sort of user-id that gets send around with each package. no idea if pandas managed connections doesn’t do that already.

Your comment reminded me of NAT-punch through, so I did some testing and it turns out panda takes care of it for us.

Client 1 connected to server using port 5558 from ip
Server saw client 1 from ip on port 5558

Client 2 connected (on a separate machine) to server using port 5558 from ip
Server saw client 2 from ip on port 49152

As the server, all I need to do is keep track of the ip port of each ‘connected’ client, and the packets end up where they need to.

‘Connected’ is in quotes because it’s not really a connection, since they’re UDP packets.