select.select and socket.setblocking

Francesco Bochicchio bockman at virgilio.it
Wed Dec 31 14:17:51 EST 2008


Saju Pillai ha scritto:
> On Dec 31, 7:48 pm, Francesco Bochicchio <bock... at virgilio.it> wrote:
> 
> Is this correct ? IIRC even in blocking mode recv() can return with
> less bytes than requested, unless the MSG_WAITALL flag is supplied.
> Blocking mode only guarantees that recv() will wait for a message if
> none is available - but not that it *will* return the number of bytes
> requested.
> 
> -srp
> 

You are right ... most of my socket experience predates MSG_WAITALL, and 
I forgot that now the default behaviour is different ... oops ...

Ciao
------
FB



More information about the Python-list mailing list