首页 > 其他分享 >TCP Connection Status

TCP Connection Status

时间:2022-11-12 22:13:34浏览次数:59  
标签:Status endpoint remote request connection TCP Connection termination

A TCP connection progresses through a series of states during its lifetime. The following diagram illustrates the possible states for a TCP connection and how the states transition based on various events from either the network or from the local TCP sockets application.

  Figure 1. TCP state transition diagram

 

 

 

TCP State Table

TCP connection stateDescription
LISTEN Waiting for a connection request from a remote TCP application. This is the state in which you can find the listening socket of a local TCP server.
SYN-SENT Waiting for an acknowledgment from the remote endpoint after having sent a connection request. Results after step 1 of the three-way TCP handshake.
SYN-RECEIVED This endpoint has received a connection request and sent an acknowledgment. This endpoint is waiting for final acknowledgment that the other endpoint did receive this endpoint's acknowledgment of the original connection request. Results after step 2 of the three-way TCP handshake.
ESTABLISHED Represents a fully established connection; this is the normal state for the data transfer phase of the connection.
FIN-WAIT-1 Waiting for an acknowledgment of the connection termination request or for a simultaneous connection termination request from the remote TCP. This state is normally of short duration.
FIN-WAIT-2 Waiting for a connection termination request from the remote TCP after this endpoint has sent its connection termination request. This state is normally of short duration, but if the remote socket endpoint does not close its socket shortly after it has received information that this socket endpoint closed the connection, then it might last for some time. Excessive FIN-WAIT-2 states can indicate an error in the coding of the remote application.
CLOSE-WAIT This endpoint has received a close request from the remote endpoint and this TCP is now waiting for a connection termination request from the local application.
CLOSING Waiting for a connection termination request acknowledgment from the remote TCP. This state is entered when this endpoint receives a close request from the local application, sends a termination request to the remote endpoint, and receives a termination request before it receives the acknowledgment from the remote endpoint.
LAST-ACK Waiting for an acknowledgment of the connection termination request previously sent to the remote TCP. This state is entered when this endpoint received a termination request before it sent its termination request.
TIME-WAIT Waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.
CLOSED Represents no connection state at all.

标签:Status,endpoint,remote,request,connection,TCP,Connection,termination
From: https://www.cnblogs.com/zy09/p/16884826.html

相关文章

  • TCP-可靠传输-流量-拥塞控制
    1.TCP的可靠传输1.1停止等待ARQ协议主机采用TCP发出信息时会设置一个定时器,若超出定时器所设定的时间还没有响应过来,则主机会认为发出去的消息没有传达到目的......
  • Android TCP客户端
    文章目录​​一、创建工程​​​​二、添加网络权限​​​​三、添加布局代码​​​​四、添加逻辑代码​​​​五、通信测试​​​​六、源码分享​​一、创建工程二、添加......
  • go错误汇总2:[ERROR] listen tcp: address 8082: missing port in address
    go错误汇总2:[ERROR]listentcp:address8082:missingportinaddress错误信息:[ERROR]listentcp:address8082:missingportinaddress 错误原因:代......
  • 【lwip】12-一文解决TCP原理
    目录前言12.1TCP协议简介12.2TCP相关的一些概念词12.2.1MSL12.2.2MSS12.3TCP工作特性12.3.1面向连接12.3.2全双工通信12.3.3可靠性12.3.4缓冲机制12.3.5拥塞控制......
  • 关于单机最大tcp连接数 及 linux …
    在tcp应用中,server事先在某个固定端口监听,client主动发起连接,经过三路握手后建立tcp连接。那么对单机,其最大并发tcp连接数是多少?如何标识一个TCP连接ip, local port,remo......
  • TCP 三次握手-四次挥手
    TCP三次握手传输控制协议(TCP,TransmissionControlProtocol)是一种面向连接的、可靠的、基于字节流的传输层通信协议,由IETF的RFC793[1]定义。TCP三次握手是TCP建立连接......
  • TCP三次握手一二三问
    下面整理下TCP握手和挥手的几个问题,参考资料小林图解计算机网络1、什么是三次握手?Client端向Server端发送SYN为1的报文段,携带一个初始序列号x,client端进入SYN_SENT状态......
  • 为什么TCP 建连接要3次,断连接却要4次呢?
    大家好,今天聊聊传输层通信协议TCP的经典问题:建连接与断连接。网络上的传输是没有连接的,包括TCP也是一样的。而TCP所谓的“连接”,其实只不过是在通讯的双方维护一个“连接状......
  • HP-ERS-T244 RS485/RS232四串口工业级串口服务器RS232/485转以太网TCP/IP物联网网关
     HP-ERS-T244是一款四串口服务器,采用Cortex-M7方案,主频高达400MHz,性能更强,传输速度更快,可靠性更高。搭载深度优化的TCP/IP协议栈。双重看门狗和多种保活机制助力设备稳......
  • 如何解决 centos 7 普通用户 执行 systemctl start|stop|status 服务名 需要输入root
    使用root用户修改系统配置,让普通用户能启停服务:[root@localhost~]#vi/usr/share/polkit-1/actions/org.freedesktop.systemd1.policy<actionid="org.freedesktop.sys......