网络编程-TCP状态图详细说明 没有不懂的

来源:互联网 发布:社区服务网络是什么 编辑:程序博客网 时间:2024/06/05 23:43

net/ipv4/tcp.c

* Description of States:
 *
 * TCP_SYN_SENT sent a connection request, waiting for ack
 *
 * TCP_SYN_RECV received a connection request, sent ack,
 * waiting for final ack in three-way handshake.
 *
 * TCP_ESTABLISHED connection established
 *
 * TCP_FIN_WAIT1 our side has shutdown, waiting to complete
 * transmission of remaining buffered data
 *
 * TCP_FIN_WAIT2 all buffered data sent, waiting for remote
 * to shutdown
 *
 * TCP_CLOSING both sides have shutdown but we still have
 * data we have to finish sending
 *
 * TCP_TIME_WAIT timeout to catch resent junk before entering
 * closed, can only be entered from FIN_WAIT2
 * or CLOSING.  Required because the other end
 * may not have gotten our last ACK causing it
 * to retransmit the data packet (which we ignore)
 *
 * TCP_CLOSE_WAIT remote side has shutdown and is waiting for
 * us to finish writing our data and to shutdown
 * (we have to close() to move on to LAST_ACK)
 *
 * TCP_LAST_ACK out side has shutdown after remote has
 * shutdown.  There may still be data in our
 * buffer that we have to finish sending
 *
 * TCP_CLOSE socket is finished
 */




0 0
原创粉丝点击