to myself 的分类学习日志

做自己想做的事
posts - 232, comments - 6, trackbacks - 0, articles - 0

连接状态

Posted on 2010-08-03 16:06 kongkongzi 阅读(194) 评论(0)  编辑 收藏 引用 所属分类: network programming
连接状态 State
  ESTABLISHED 有一个确定的连接
  SYN_SENT 活动socket尝试建立连接
  SYN_RECV 连接请求已经收到
  FIN_WAIT1 socket已经关闭,链接已经断开。
  FIN_WAIT2 socket已经关闭,链接在最后断开。
  TIME_WAIT The socket is waiting after close to handle packets still in the network.
  CLOSED The socket is not being used.
  CLOSE_WAIT The remote end has shut down, waiting for the socket to close.
  LAST_ACK The remote end has shut down, and the socket is closed. Waiting for acknowledgement.
  LISTEN The socket is listening for incoming connections.
  CLOSING Both sockets are shut down but we still donot have all our data sent.
  UNKNOWN The state of the socket is unknown.