Internet domain socket states:
CLOSED: The socket is not in use.
LISTEN: The socket is listening for incoming connections. Unconnected
listening sockets like these are only displayed when using the -a option.
SYN_SENT: The socket is actively trying to establish a connection to a
remote peer.
SYN_RCVD: The socket has passively received a connection request from a
remote peer.
ESTABLISHED: The socket has an established connection between a local
application and a remote peer.
CLOSE_WAIT: The socket connection has been closed by the remote peer,
and the system is waiting for the local application to close its half of
the connection.
LAST_ACK: The socket connection has been closed by the remote peer, the
local application has closed its half of the connection, and the system
is waiting for the remote peer to acknowledge the close.
FIN_WAIT_1: The socket connection has been closed by the local
application, the remote peer has not yet acknowledged the close, and the
system is waiting for it to close its half of the connection.
FIN_WAIT_2: The socket connection has been closed by the local
application, the remote peer has acknowledged the close, and the system
is waiting for it to close its half of the connection.
CLOSING: The socket connection has been closed by the local application
and the remote peer simultaneously, and the remote peer has not yet
acknowledged the close attempt of the local application.
TIME_WAIT: The socket connection has been closed by the local
application, the remote peer has closed its half of the connection, and
the system is waiting to be sure that the remote peer received the last
acknowledgement.
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-toJimOvv-1597509572365)(/Users/ldd/Documents/typora_note/assets/tcp_state.png)]
source from ldd