<div dir="ltr">2013/4/26 Ludo Brands <span dir="ltr"><<a href="mailto:ludo.brands@free.fr" target="_blank">ludo.brands@free.fr</a>></span><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div class="im">On 04/26/2013 08:58 AM, Michael Van Canneyt wrote:<br>
> On Thu, 25 Apr 2013, silvioprog wrote:<br>
><br>
</div><div class="im">>> I do not know where it would be used, it's just an observation hehe...<br>
><br>
> Yes, but the above is what I mean with 'it does not make much sense'.<br>
><br>
> I can easily add this - in fact I will do so, but with multiple sockets<br>
> it is better to combine the waitfordata()<br>
><br>
<br>
</div>In blocking mode the select is vital if you want to do simultaneous read<br>
and write on the same socket in the same thread. Otherwise you are<br>
simply blocking the thread in a recv when nothing comes in or in a send<br>
when the socket buffer is not empty. Note that select also returns when<br>
an exception occurs.<br>
<span class=""><font color="#888888"><br>
Ludo</font></span></blockquote></div><div><br></div><div style>Exactly. In my small sample, when no buffer is received from server, the process stays blocked on:</div><div style><br></div><div style><a href="https://bitbucket.org/silvioprog/tcpipcomp/src/f42be14db1e74d750fa88d6b4554b209145ff589/src/tcpipclient.pas?at=master#cl-189">https://bitbucket.org/silvioprog/tcpipcomp/src/f42be14db1e74d750fa88d6b4554b209145ff589/src/tcpipclient.pas?at=master#cl-189</a><br>

</div><div><br></div>-- <br>Silvio Clécio<br>My public projects - <a href="http://github.com/silvioprog" target="_blank">github.com/silvioprog</a>
</div></div>