The client does not receive requests, it only issues them. The server receives requests, so it needs to be allowed to do so. If I allowed all the doors I would have a large attack area through exploration requisitions.
Actually it is not that you need to open the doors for the customer, they are all open, there is no reason to close exit doors unless you do not trust what is running on the machine, but there open door is the least of the problems.
It is like a show, a closed party, in event, there is control of who enters, not who leaves. Everyone can leave, only those who have permission can enter.
Of course every client can be a server as well. In point-to-point communications they are like that. Point to point always need to know the point address to start the communication.
The initial communication request needs the door open, but after that is no longer a problem on most architectures since the connection can be kept open, then it is as if it were two clients if communicated.
I get it. So if I wanted two computers to exchange information with each other, taking into account that they do not need to have open ports on the modem, I would have to use a server outside the two networks where the clients will be? Being the server only responsible for redirecting messages, this is how services like Whatsapp and other messengers work?
– ayelsew
I believe that both client and server use ports to communicate, your answer gives the opposite impression. Or I don’t know what... If the customer needs a port should be more explicit...
– MagicHat
@Thomsontorvalds is right, if you want to do point-to-point communication only if the clients are servers as well. To not require this you need a server at least to start the conversation, then it is possible for them to communicate directly keeping the communication open, then you no longer need requests. Each communicator has its own way, but I believe the most common is that the server only exists to initiate communication between points. In some cases he wants to centralize communication and have a history, then the server keeps all the conversation in it. Games are like that too, until pq is a "chat" of them
– Maniero
@Magichat I believe that "it is not that we need to open the doors to the customer, they are all open." clearly indicates that uses doors.
– Maniero
It seems so, the question is broad and not clear, because it does not even refer to physical or logical doors... As your answers usually address a wider range, I found it convenient to mention... But perhaps you need give better elaborated question
– MagicHat