I think the sending packet to other device works like the following.
1. The server device listens with port. for example 80
2. The client connects to the server devices.
for example, the port of client that connects to server is 64000.
If the connection is established , the two devices could send tcp packets.
And then could the 3rd device send the tcp packet to the client?
-
Hi Andrew, and what is the question? is not clear what you want achive– camp0Commented Jul 1, 2019 at 7:05
Add a comment
|
1 Answer
No.
A TCP connection is established between 2 processes (usually running on 2 hosts), identified by the tuple IP address + TCP port. A 3rd host cannot join a TCP session.
To do so it would have to use the same tuple as one of the host, this mean faking to be some other host - i.e. hijacking the connection.
-
And how does p2p hole punching work? I thought that p2p hole punching worked the above. Commented Jul 1, 2019 at 7:45
-
Hole punching can work with stateless UDP where only the destination port is relevant but not with TCP.– Zac67 ♦Commented Jul 1, 2019 at 9:27