How exactly does the TCP stack on windows determine that the connection has been forcibly closed or reset by peer?
I know that TCP on Windows by default tries to retransmit an unacknowledged packet 5 times. What happens if there is still no acknowledgement after 5 attempts? Does it immediately return WSAECONNRESET code on a blocking socket?
Also when we do receive WSAECONNRESET error code, what is the actual state of that TCP connection?