How to establish a P2P connection?

1

In a normal connection, it is necessary that whoever is going to receive the connection has an open port on the router (transmitting to a computer on the internal network). But in a P2P connection this does not happen.

How do P2P programs work independently of this open port? For example, programs such as torrent or Gnutella make multiple connections to network nodes, in case the torrent has the tracker that can somehow work as a mediator and create a connection between the machines, but in the case of Gnutella there is something centralizing, there is only one list of nodes to connect to.

How can I implement this initial connection? Assuming it is not a local connection and that there is no open port on the router (as it usually does) (do not necessarily need the code, only the concept is sufficient)

    
asked by anonymous 03.03.2017 / 01:57

0 answers