Current status of the TCP connection. There are eleven possible states:
CLOSED: The connection has been closed.
LISTEN: Listening state
SYNSENT: In the three-way handshake phase when the SYN packet
has been sent out.
SYNRCVD: In the three-way handshake phase when the SYN packet
has been received.
ESTABLISHED: The connection has been established.
FINWAIT1: The local end has sent the FIN packet.
FINWAIT2: The FIN packet sent by the local end has been
acknowledged.
CLOSEWAIT: The local end has received the FIN packet from the peer
end.
LASTACK: The local end has received the FIN packet from the peer
end, and then sent its own FIN packet.
CLOSING: The local end has sent the FIN packet from the peer end,
and received the FIN packet from the peer end before the ACK packet
for the peer end to respond with this FIN packet is received.
TIMEWAIT: The FIN packet sent by the local end has been
acknowledged, and the local end has also acknowledged the FIN
packet.