@nprofile1q... technically doesn't matter what language as long as you can send udp packets, but all of it other than needing an external server to know your public ip can be client side
@nprofile1q... you have to establish a udp connection to a server to find your public IP and port, does exchanges with another player, then both players send ping udp packets to said addresses, problem is that you also have to periodically redo this if your ip got refreshed