Direct P2P Connection

This section resembles this thread.

I am new to network programming, never doing anything but basic TCP / UDP on one local computer. Now I am developing an application that will need support for a P2P network. More specifically, I will need an application to connect and communicate over the Internet, preferably without using a server to create matchmakers between clients.

I know and assume that almost all users are behind a router, which complicates the process, since none of the clients can initiate a direct connection to another.

I know that UPnP is an option to allow port forwarding without manually configuring users, but at the moment this is not an option. Are they in any way to achieve my goal or do I need this server?

+4
source share
5 answers

You will need a server to exchange the IP address, etc. As another thread indicates, the only way to guarantee a connection is through a server proxy. Most peer-to-peer systems use UPnP and NAT Hole Punching (this method requires the transfer of server data to the server and works only with UDP) to establish a connection in most cases.

NAT Hole , , , . UDP NAT IP- , , ( UDP), NAT .

+5
+6

UPnP (, , ), , , , NAT.

+2

"matchmake" , , skype, NAT. - , , , - ( , , ).

+1

All Articles