I have a Windows 7 server and a Windows 7 client application where the client application sends a query to the server application and the server application would respond. An issue can occur if the client remains connected to the server with the same socket and attempts to send multiple queries.
FWIW, I do not get this issue if the client doesn't send a request and only listens (streaming).
An example when the problem occurs (after successful queries):
- Client sends query (ACK and ACK,PSH)
- Server sees both and sends a response (ACK,PSH).
- Client doesn't see the response and sends a TCP Retransmission.
- Server sees the Retransmission and sends a (DUP ACK), with a retransmission of the response found in (2).
- Client sees the (DUP ACK), but does not see any of the retransmissions.
Eventually the server stops sending the retransmissions and the client hangs while listening to it. This never occurs on the first time it is sent. I am a bit new to the TCPIP protocol and I am not sure if this issue is being caused by a timeout with the server or if the client is reading incorrectly (currently, I am having the client listen indefinitely for a response after sending a request).
*Added note: This is using the IPv4 protocol.