P2P in Visual Studio 2010

I was having trouble making my server/client(it is going to be a node) communicate with firefox(for purposes of testing), I wasted some time learning what “hole punching” is and even thought I was going to have an uphill battle with this issue. Alas, VB has a TcpListener with the following function: AllowNatTraversal. All you need to do is to bind your external IP address on your TcpListener and then call AllowNatTraversal(True). Done. You can now receive stuff from the client 😀

Thank you Bill Gates.

Now, on a side note, how do they do it? Last time I checked “hole punching” required a non-firewalled server and didn’t work very well trough TCP. Hmmmm. Perhaps some other method of NAT traversing? I hope I’m not building something that will rely on a centralized server. It would kill the point of having P2P.


Leave a comment

Filed under Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s