what’s the difference between socket.send() and socket.sendall() ?

Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa915 at spamschutz.glglgl.de
Mon Jan 7 08:17:50 EST 2013


Am 07.01.2013 11:35 schrieb iMath:
> what’s the difference between socket.send() and socket.sendall() ?
>
> It is so hard for me to tell the difference between them from the python doc
>
> so what is the difference between them ?
>
> and each one is suitable for which case ?
>

The docs are your friend. See

http://docs.python.org/2/library/socket.html#socket.socket.sendall

| [...] Unlike send(), this method continues to send data from string
| until either all data has been sent or an error occurs.

HTH,

Thomas



More information about the Python-list mailing list