I have an application I've written on Windows 7 that is connecting TCP to a custom device. The device is sending status packets approx. every 25ms to the host. The device is also running code I've written. They are connected ethernet via a DSL router. The application is also sending data over a second TCP port to the device.
All works well until I get a duplicate ACK from the host. The orignal packet from device to host shows up in Wireshark. After the 3rd DUP ACK, the device sends a fast retransmit of the packet. The host keeps sending DUP ACKs for a total of 7. The device keeps sending it's status updates every 25ms. After about 1 sec. the device re-transmits these status packets. Meanwhile, a thread on the host has a recv() active with a 5sec. timeout. This recv eventually times out and then disconnects. During this time, the host is continuing to send data on the other port. So, the sequence shown in Wireshark seems OK, but the application times out waiting for data.
Thus, various questions that I hope someone can help me understand:
all the packets show up in the Wireshark trace, so what might cause Windows to issue the DUP ACK (Wireshark is running on the same machine)?
what might be causing the host to not receive the data (either the original or re-trans)?
if, for some reason, the receive thread on the host is locked up, would this cause these symptoms (i.e. if the receive buffers are all full, will this cause DUP ACKs? The window size from the host never drops...).
Any help would be appreciated.