Heiko Wundram
2002-08-23 20:26:45 UTC
select can see only data that's readable from the system level
device (the socket, that is.) Your data is in a file object, C
library buffer in your process' space. That's my guess.
Python's select function cleverly supports rfile as an input, but
it isn't so clever as to actually be able to tell you if rfile is
readable; rather, it can only tell you if rfile's device is readable.
Yep... I tried that out just now, and it works, when I put the rfile ondevice (the socket, that is.) Your data is in a file object, C
library buffer in your process' space. That's my guess.
Python's select function cleverly supports rfile as an input, but
it isn't so clever as to actually be able to tell you if rfile is
readable; rather, it can only tell you if rfile's device is readable.
unbuffered. I had to switch to the lower level functions (recv) anyway,
as the file-object functions don't return a length in most (????)
cases... Sometimes they do, and it works, but most of the time it
doesn't work... Strange.
Well... Using recv and send directly is no backbreaking experience, as I
can then quite easily switch to using an ssl socket some time later.
Thanks!
Heiko Wundram
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://mail.python.org/pipermail/python-list/attachments/20020823/3f26573d/attachment.pgp>