timeoutsocket & sendall / Python 2.1

John J Lee jjl at pobox.com
Tue Nov 19 13:32:00 EST 2002


Surely somebody out there knows if this is correct?

Does nobody use timeoutsocket any more?  If not, what do you use?

Thanks for any help

"John J Lee" <jjl at pobox.com> wrote in message news:<mailman.1037399909.22831.python-list at python.org>...
> It seems that Python 2.1 added a sendall method to socket objects.  I
> think something like this needs adding to timeoutsocket.py:
[...]
> +   def sendall(self, data, flags=0):
> +       while data:
> +           n = self.send(data, flags)
> +           data = data[n:]
> +   # end sendall
[...]
> I've never used sockets directly, so apologies if this is broken /
> hopelessly naive.
> 
> I'm surprised that nobody has bumped into this before, which is
> why I'm posting it here -- I have a feeling I must be missing
> something.


John



More information about the Python-list mailing list