<div dir="ltr"><div class="gmail_extra">As far as I remember, Unix API doesn't give you any ability to tell that you have received ACK.</div><div class="gmail_extra"><br></div><div class="gmail_extra">There are many reasons. One of them is that TCP socket is a pipe only from application point of view. Kernel sees TCP as a window: some fragments of window are received, some are not. When to notify you? When all buffer is sent? </div>
<div class="gmail_extra">Perhaps in such way your application will be very inefficient, because you will have to spend more time fetching data from remote server or local disk and send again.</div><div class="gmail_extra">
<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Maybe you should take a look at some application level confirm? "Hey there is a packet #145", "Thanks, I've received #145".</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"> </div></div>