A web server accepting connections using a TCP socket is defined by can accept multiple connections by spawning a thread immediately following each call to accept() that communicates with the client over its connection file descriptor, enabling the server to make a subsequent and concurrent call to accept() for the next connection.
True or False? Explanation.
TRUE.
For a stateful protocol (like TCP), a connection is identified by a 4-tuple consisting of source and destination ports and source and destination IP addresses. So, if two different machines connect to the same port on a third machine, there are two distinct connections because the source IPs differ. If the same machine (or two behind NAT or otherwise sharing the same IP address) connects twice to a single remote end, the connections are differentiated by source port (which is generally a random high-numbered port).
Simply, if I connect to the same web server twice from my client, the two connections will have different source ports from my perspective and destination ports from the web server's. So there is no ambiguity, even though both connections have the same source and destination IP addresses.
Get Answers For Free
Most questions answered within 1 hours.