1.2.3.1.57 TCPIP_TCP_WasReset Function

C

bool TCPIP_TCP_WasReset(
    TCP_SOCKET hTCP
);

Description

This function is a self-clearing semaphore indicating whether or not a socket has been reset since the previous call. This function indicates that a RST was received from the remote node, a TCPIP_TCP_Disconnect was called or the socket was somehow re-initalized.

It also returns true just after the socket was opened.

Preconditions

TCP is initialized.

Parameters

ParametersDescription
hTCPThe socket to check.

Returns

None.

Remarks

A server socket upon receiving a RST signal will go to listen state.

A client socket will be closed when RST is received.

The info that the FIN was received could be also obtained by registering a signal with the socket (the preferred way).