Answer the question
In order to leave comments, you need to log in
What to read on client server development to learn how to create p2p applications?
Is there any literature after reading that it will be clear how to create p2p applications such as torrent?
I need to write a small client-server to exchange data between two arbitrary computers on the Internet.
Those. At the moment I do not understand what to do with ip addresses. Will it be possible to establish a connection if they are dynamic, and it is generally not clear what affects the connection between 2 programs over the network.
Answer the question
In order to leave comments, you need to log in
In general, p2p is built like this:
There are 2 clients A and B who want to establish a connection between themselves and there is a server C, to which both are connected.
client A sends to server C a request "I want to connect to B"
server C sends to client B "client A wants to connect"
client B can refuse the connection by notifying A about it through server
client B can accept the connection, then it starts listening on an arbitrary port and sends to the server "I accept A, my port: XXXX, my signature: UUUU" the
server sends A "client B accepted the connection, IP address, port, signature"
A connects to B and sends the signature
If the signature is correct B stops listening to the port, connection established
With an incorrect signature, B breaks the connection (not A connected)
What to read on client server development to learn how to create p2p applications?Answers to your previous questions...
For p2p, a SERVER is also needed, which will transmit information to the participants for the connection.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question