Introduction - If you have any usage issues, please Google them yourself
A process simulation p2p chat source code, the process is very simple, p2pserver running on a LAN with a public ip on the computer, p2pclient run on two different nat after (Note that if two clients running on a nat, the program is likely not run properly, depending on whether your nat support loopback translation, see http://midcom-p2p.sourceforge.net/draft-ford-midcom-p2p-01.txt, of course, this problem can be the two sides first try to connect to each other s network ip resolved, but this code is just to verify the principle, and did not deal with these issues), after the logon computer can get logged in the computer s user name, computer and log in through the send username message format to send a message. If the transmission was successful, that you have made to connect directly with each other s success.