Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: select.select and socket.setblocking (http://www.velocityreviews.com/forums/t650683-re-select-select-and-socket-setblocking.html)

Jean-Paul Calderone 12-30-2008 08:57 PM

Re: select.select and socket.setblocking
 
On Tue, 30 Dec 2008 15:55:51 -0500, Jean-Paul Calderone <exarkun@divmod.com> wrote:
>On Tue, 30 Dec 2008 14:41:17 -0600, Grant Edwards <grante@visi.com> wrote:
>>On 2008-12-30, Francesco Bochicchio <bockman@virgilio.it> wrote:
>>>3. AFAIK (sorry, I feel acronym-ly today ;), there is no difference in
>>>select between blocking and non-blocking mode. The difference is in the
>>>recv (again, assuming that you use TCP as protocol, that is AF_INET,
>>>SOCK_STREAM), which in the blocking case would wait to receive all the
>>>bytes that you requested,

>>
>>No, in blocking mode it will wait to receive _some_ data (1 or
>>more bytes). The "requested" amount is strictly an upper
>>limit: recv won't return more than the requested number of
>>bytes, but it might return less.

>
>Hi Grant,
>
>I don't think you read Francesco's message carefully enough. :)


Ah, no, it was I who didn't read carefully enough. Nevermind.

Jean-Paul


All times are GMT. The time now is 06:54 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.