Do TCP connections get moved to another port after they are opened? [duplicate]

A TCP connection is uniquely identified by two (IP address, TCP port) tuples (one for each endpoint). So by definition, one can’t move a port or IP address of a connection but just open a different one.

If the server binds to port 28081 all accepted connections will have this port on the server side (although they most likely will have varying port numbers on the client side).

For example, if two processes from the same client machine will connect to the same server, the IP address and TCP port on the server side will be the same for both connections. On the client side however, they will have two different port numbers allowing the operating system on both sides to uniquely identify which process and file descriptor the received TCP packets should be assigned to.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)