<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 09:19 AM, Michael Van Canneyt wrote:<br>
> On Fri, 26 Apr 2013, Ludo Brands wrote:<br>
><br>
>> On 04/26/2013 08:58 AM, Michael Van Canneyt wrote:<br>
>>><br>
>>><br>
>>> On Thu, 25 Apr 2013, silvioprog wrote:<br>
>>><br>
>>>> 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>
>> 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>
><br>
> I am aware of all this.<br>
<br>
</div>My message is meant for the OP who wants to do simultaneous read/write<br>
on the socket in one thread and doesn't know what the use of select is.<br>
The 'it does not make much sense' is in that context misleading the OP<br>
and some more explanation was needed;)<br>
<span class=""><font color="#888888"><br>
Ludo<br></font></span></blockquote></div><div class="gmail_extra"><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Ludo, a small question....<br></div><div class="gmail_extra">

<br></div><div class="gmail_extra">So, In loop of my thread, to the process doesn't stay blocked in recv, I need to use select in client too?</div></div></div><div class="gmail_extra"><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>