I find it difficult to find help resources about this. I know how to use the TCPClient class to create a connection between one IP / port / machine and another.
My doubt is how this works when one computer wants to initiate a TCP connection on another machine, where the destination computer is on a different network. Thus, the destination network can have hundreds of computers, each with its own IP address, and the network will have one public IP address. This will use the TCPClient class or whatever, more suitable.
I know that we could use ports, and then inside the network, the port could be redirected to the correct machine, but I was looking for a solution similar to those that use LogMeIn services. Basically, I wanted to use port 80 always, and then initiate a connection to the server on this particular machine or others on the same network when I need to.
I suppose, theoretically, I could create a connection first from within this network, then on the server, save the details and close the connection, and then in the near future, when I need it, I will open the connection again.
Therefore, in my scenario, I will have many clients in several networks, each network can have several internal machines with a client installed. Then on the server I would connect these machines if necessary. On every network, I would like to use port 80 for obvious reasons. The reason I want to initiate a connection from a server, and not on client computers, is just to save resources, I could not cope with open connections until, in the end, I needed to communicate with them.
In addition, I have no control over client networks other than those that have my client installed.
Ideally, I want to have C # information, maybe code, not network configuration.