Skip to content

Latest commit

 

History

History
134 lines (97 loc) · 4.87 KB

ne-mstcpip-tcpstate.md

File metadata and controls

134 lines (97 loc) · 4.87 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NE:mstcpip._TCPSTATE
TCPSTATE (mstcpip.h)
Indicates the possible states of a Transmission Control Protocol (TCP) connection.
TCPSTATE
TCPSTATE enumeration [Winsock]
TCPSTATE_CLOSED
TCPSTATE_CLOSE_WAIT
TCPSTATE_CLOSING
TCPSTATE_ESTABLISHED
TCPSTATE_FIN_WAIT_1
TCPSTATE_FIN_WAIT_2
TCPSTATE_LAST_ACK
TCPSTATE_LISTEN
TCPSTATE_MAX
TCPSTATE_SYN_RCVD
TCPSTATE_SYN_SENT
TCPSTATE_TIME_WAIT
mstcpip/TCPSTATE
mstcpip/TCPSTATE_CLOSED
mstcpip/TCPSTATE_CLOSE_WAIT
mstcpip/TCPSTATE_CLOSING
mstcpip/TCPSTATE_ESTABLISHED
mstcpip/TCPSTATE_FIN_WAIT_1
mstcpip/TCPSTATE_FIN_WAIT_2
mstcpip/TCPSTATE_LAST_ACK
mstcpip/TCPSTATE_LISTEN
mstcpip/TCPSTATE_MAX
mstcpip/TCPSTATE_SYN_RCVD
mstcpip/TCPSTATE_SYN_SENT
mstcpip/TCPSTATE_TIME_WAIT
winsock.tcpstate
winsock\tcpstate.htm
WinSock
225C423E-C820-4E9F-8261-DA1E14F81683
12/05/2018
TCPSTATE, TCPSTATE enumeration [Winsock], TCPSTATE_CLOSED, TCPSTATE_CLOSE_WAIT, TCPSTATE_CLOSING, TCPSTATE_ESTABLISHED, TCPSTATE_FIN_WAIT_1, TCPSTATE_FIN_WAIT_2, TCPSTATE_LAST_ACK, TCPSTATE_LISTEN, TCPSTATE_MAX, TCPSTATE_SYN_RCVD, TCPSTATE_SYN_SENT, TCPSTATE_TIME_WAIT, mstcpip/TCPSTATE, mstcpip/TCPSTATE_CLOSED, mstcpip/TCPSTATE_CLOSE_WAIT, mstcpip/TCPSTATE_CLOSING, mstcpip/TCPSTATE_ESTABLISHED, mstcpip/TCPSTATE_FIN_WAIT_1, mstcpip/TCPSTATE_FIN_WAIT_2, mstcpip/TCPSTATE_LAST_ACK, mstcpip/TCPSTATE_LISTEN, mstcpip/TCPSTATE_MAX, mstcpip/TCPSTATE_SYN_RCVD, mstcpip/TCPSTATE_SYN_SENT, mstcpip/TCPSTATE_TIME_WAIT, winsock.tcpstate
mstcpip.h
Windows
Windows 10, version 1703 [desktop apps only]
Windows Server 2016 [desktop apps only]
Windows
TCPSTATE
19H1
_TCPSTATE
mstcpip/_TCPSTATE
TCPSTATE
mstcpip/TCPSTATE
c++
APIRef
kbSyntax
HeaderDef
Mstcpip.h
TCPSTATE

TCPSTATE enumeration

-description

The Windows Sockets TCPSTATE enumeration indicates the possible states of a Transmission Control Protocol (TCP) connection.

-enum-fields

-field TCPSTATE_CLOSED

The TCP connection has no connection state at all. This state represents the state when there is no Transmission Control Block (TCB), and therefore, no connection.

-field TCPSTATE_LISTEN

The TCP connection is waiting for a connection request from any remote TCP and port.

-field TCPSTATE_SYN_SENT

-The TCP connection is waiting for a matching connection request after sending a connection request.

-field TCPSTATE_SYN_RCVD

The TCP connection is waiting for an acknowledgment that confirms the connection request after both receiving and sending a connection request.

-field TCPSTATE_ESTABLISHED

The TCP connection is an open connection, so the data received can be delivered to the user. This state is normal state for the data transfer phase of the connection.

-field TCPSTATE_FIN_WAIT_1

The TCP connection is waiting for a request to end the connection from the remote TCP, or an acknowledgment of the previously sent request to end the connection.

-field TCPSTATE_FIN_WAIT_2

The TCP connection is waiting for a request to end the connection from the remote TCP.

-field TCPSTATE_CLOSE_WAIT

The TCP connection is waiting for a request to end the connection from the local user.

-field TCPSTATE_CLOSING

The TCP connection is waiting for an acknowledgment of the request to end the connection from the remote TCP.

-field TCPSTATE_LAST_ACK

The TCP connection is waiting for an acknowledgment of the request to end the connection that was previously sent to the remote TCP, which includes an acknowledgment of its request to end the connection.

-field TCPSTATE_TIME_WAIT

The TCP connection is waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its request to end the connection.

-field TCPSTATE_MAX

The maximum value of the TCPSTATE enumeration.

-remarks

A TCP connection progresses from one state to another in response to events. The events are the user calls OPEN, SEND, RECEIVE, CLOSE, ABORT, and STATUS; the incoming segments, particularly those containing the SYN, ACK, RST and FIN flags; and timeouts.

For more information about TCP connection states, see RFC 793.

-see-also

SIO_TCP_INFO

TCP_INFO_v0