I want to use NAT hole-punching in one of my java applications, but I don't know where to start. I'd like some sample code to start off with.... (I have access to a PHP server with sockets, cURL, and server sockets, so some PHP server code would be appreciated too...)
Thanks in advance.
EDIT: I am sorry, I was not clear enough. I want to know how to create a PHP server that can be "the middleman" for hole punching. I also want to know how to make a java application that can connect to the PHP server, and maintain that connection while another java application connects to the first one on the same port. (Which is my impression of how NAT hole punching works)