<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Thanks Max,<div><br></div><div>I will do it with application level confirmation. :)</div><div><br><div><hr id="stopSpelling">Date: Mon, 17 Mar 2014 14:29:56 +0400<br>Subject: Re: [erlang-questions] gen_tcp send non-blocking in erlang?<br>From: max.lapshin@gmail.com<br>To: vinothsparrow@live.com<br>CC: erlang-questions@erlang.org<br><br><div dir="ltr"><div class="ecxgmail_extra">As far as I remember, Unix API doesn't give you any ability to tell that you have received ACK.</div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_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="ecxgmail_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="ecxgmail_extra">
<br></div><div class="ecxgmail_extra"><br></div><div class="ecxgmail_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="ecxgmail_extra"><br></div><div class="ecxgmail_extra"> </div></div></div></div> </div></body>
</html>