Now have a Server Server and then there were two clientA clientB
ServerA
|
|
-- -- -- -- -- -- -- -- and -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - -- -- --
| |
| |
Gateway is A gateway B
| |
| |
ClientA clientB
Architecture as shown
ServerA open and listens on a port 8000
ClientA link ServerA port 8000, ServerA knew this time such as 10.0.10.125 clientA public address and port 9999
ServerA clientB connection port 8000, this time ServerA knew such as 11.0.10.125 clinetB public address and port 5555
ServerA -- -- -- -- -- & gt; ClientA informed clientB public IP and port
ServerA -- -- -- -- -- & gt; ClientB informed clientA public IP and port
Then
ClientA went to connect clientB public address and port
ClientB went to connect clientA public address and port
But this time I have a doubt
ClientA clientA at this time to connect clientB IP and port outside your own network port or 9999?
ClientB clientB at this time to connect clientA IP and port outside your own network port or 5555?
But this time the two sides to connect each other, the outside network port will not change, with the first visit their ServerA ports to do their own will not have any problems