1. Why does socket provide an interface between the application layer and the transport layer and not between other layers?
From the analogy operating system and the details of their respective concerns
3. Why does the active shutdown party stay in time when TCP waves its hands four times_ Wait status? And why time_ Do you want to maintain 2msl in the wait state?
There are two reasons for the TIME_WAIT state:
- To implement TCP’s full-duplex connection termination reliably
- To allow old duplicate segments to expire in the network
TCP must prevent old duplicates from a connection from reappearing at some later time and being misinterpreted as belonging to a new incarnation of the same connection. To
do this, TCP will not initiate a new incarnation of a connection that is currently in the TIME_WAIT state. Since the duration of the TIME_WAIT state is twice the MSL, this allows MSL seconds for a packet in one direction to be lost, and another MSL seconds for the reply to be lost. By enforcing this rule, we are guaranteed that when we successfully establish a TCP connection, all old duplicates from previous incarnations of the connection have expired in the network
The socket pair for a TCP connection is the four-tuple that defines the two endpoints of the connection: the local IP address, local port, foreign IP address, and foreign port.
6. Protocols for common Internet applications
This work adoptsCC agreementThe author and the link to this article must be indicated in the reprint