Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi I came to know about "Peer-to-Peer (P2P) Communication across Network Address Translators (NATs)". The first i have to do the method called "Hole Punching". But i have no idea how to start with code (e.g. any example or sample code to start). I am using TCP socket so i need "TCP Hole Punching" to implement.

Thanks.
Please help
Posted
Updated 4-Feb-11 19:48pm
v4

You could always try this[^].
 
Share this answer
 
Comments
sufi2008123 5-Feb-11 6:50am    
i already try this.
thanks.
Richard MacCutchan 5-Feb-11 7:28am    
And what did you find?
AhmedZI 22-Feb-11 6:49am    
Could you please tell us your results? maybe share some code too? :)
sufi2008123 22-Feb-11 10:25am    
contact me sufi2008@gmail.com
Richard MacCutchan 22-Feb-11 10:29am    
???
"Hole Punching" is a misnomer as any NAT router worthy of its name will drop or ignore any connection request that it does not know about.

So what is required is a server that exists outside of both the networks that exist behind the NAT routers, this server accepts connection requests from the clients behind the NAT routers and handles the routing of information between said clients.

Now there are exceptions where the central server notifies the "clients" and "servers" behind the NAT routers of the IP addresses of each other and a direct connection is attempted but the default connection is through a central server outside of the networks behind the NAT routers.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900