1,965 views
1 votes
1 votes
Suppose that a Web server runs in Host C on port 80. Suppose this Web server uses persistent connections and is currently receiving requests from two different Hosts, A and B. Are all of the requests being sent through the same socket at Host C? If they are being passed through different sockets, do both of the sockets have port 80? Discuss and explain.

2 Answers

0 votes
0 votes
Yes,both of them will happen through C only, but only after the other.There is a synchronization mechanism in sockets using listen which contains a parameter namely "backlogs" which maintain a wait queue for all the active connections.
0 votes
0 votes

For each persistent connection, the Web server creates a separate “connection socket”. Each connection socket is identified with a four-tuple: (source IP address, source port number, destination IP address, destination port number). When host C receives and IP datagram, it examines these four fields in the datagram/segment to determine to which socket it should pass the payload of the TCP segment. Thus, the requests from A and B pass through different sockets. The identifier for both of these sockets has 80 for the destination port; however, the identifiers for these sockets have different values for source IP addresses. Unlike UDP, when the transport layer passes a TCP segment’s payload to the application process, it does not specify the source IP address, as this is implicitly specified by the socket identifier

Source: http://www.sr2jr.com/textbook-solutions/computer-science/10301008/computer-networking-a-top-down-approach-transport-layer

Related questions

1 votes
1 votes
1 answer
3
0 votes
0 votes
1 answer
4