Indy TCP Client data not received
<p><strong>Update</strong> <em>Seems like this issue is not as close related to Indy as I thought and more a topic on multi threading. I'll keep the question open as I am not 100% convinced.</em></p>

<p>I have a working application which is exchanging ascii strings with communication partners using Indy TCP client.
The communication flow looks like this:</p>

<ol>
<li>[Indy Level] Sender sends string</li>
<li>[TCP Level] Wireshark tells that this packet was delivered to the recipient</li>
<li>[TCP Level] The recipient sends a TCP ACK to confirm this packet </li>
<li>[Indy Level] The IOHandler.ReadLn method of recipient returns the data</li>
<li>[Indy Level] Via writeLn() a logical Acknowledgement is sent to the original sender</li>
</ol>

<p>Recently I noticed that there a hickups in that communication, after fiddeling with wireshark I got the following picture:</p>

<ol>
<li>[Indy Level] Sender sends string</li>
<li>[TCP Level] Wireshark tells that this packet was delivered to the recipient</li>
<li>[TCP Level] The recipient sends a TCP ACK to confirm this packet </li>
<li>[Indy Level] The <strong>IOHandler.ReadLn</strong> method of recipient does <strong>not return any data</strong></li>
<li>Nothing to do as no data is available for recipient</li>
</ol>

<p>After some timeout the sender send the orginal message again because there was no logical Acknowledgment from the recipient.</p>

<p>So my question is: If wireshark tells me that the underlying TCP mechanics did their work, how is it possible that the Indy Client has no data available?</p>

<p>Regards,
Attix</p>