当前所在位置:珠峰网资料 >> 计算机 >> 计算机等级考试 >> 正文
内核中关于TCPsocket状态的描述
发布时间:2010/12/19 0:33:22 来源:城市学习网 编辑:ziteng
 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

  */

广告合作:400-664-0084 全国热线:400-664-0084
Copyright 2010 - 2017 www.my8848.com 珠峰网 粤ICP备15066211号
珠峰网 版权所有 All Rights Reserved