Sorry hit the send button too early! <div>It's number 2 </div><div>I think some solutions would be :</div><div>1) receive smaller N of bytes with a smaller timeout, and loop (accumulate your timeout)</div><div>or</div>
<div>2) use {active, once} and receive messages on your own pace. (control when to timeout)<br><br><br><div class="gmail_quote">On Tue, Dec 27, 2011 at 2:21 PM, Ahmed Omar <span dir="ltr"><<a href="mailto:spawn.think@gmail.com">spawn.think@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's number <br><br><div class="gmail_quote"><div><div class="h5">On Tue, Dec 27, 2011 at 2:10 AM, Roberto Ostinelli <span dir="ltr"><<a href="mailto:roberto@widetag.com" target="_blank">roberto@widetag.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
dear list,<br><br>when calling gen_tcp:recv/3 by specifying a length and a timeout, when will {error, timeout} be a response? Is it:<br><br>1. when no bytes are received for a period longer than the specified Timeout<br>
2. when the number of bytes specified in Length is not received within Timeout<br>

<br>if 2, what is the best solution to actually *not* have a recv/3 timeout while receiving bytes at a very low pace (for instance on very slow connections)?<br><br>thank you,<br><br>r.<br>
<br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br>Best Regards,<br>- Ahmed Omar<div><a href="http://nl.linkedin.com/in/adiaa" target="_blank">http://nl.linkedin.com/in/adiaa</a></div>
<div>Follow me on twitter</div>
<div><a href="http://twitter.com/#!/spawn_think" target="_blank">@spawn_think</a></div><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Best Regards,<br>- Ahmed Omar<div><a href="http://nl.linkedin.com/in/adiaa" target="_blank">http://nl.linkedin.com/in/adiaa</a></div><div>Follow me on twitter</div>
<div><a href="http://twitter.com/#!/spawn_think" target="_blank">@spawn_think</a></div><br>
</div>