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

Discussion in 'Python' started by Thomas Rachel, Jan 7, 2013.

  1. 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
    Thomas Rachel, Jan 7, 2013
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Black
    Replies:
    1
    Views:
    1,080
    Alan Kennedy
    Aug 3, 2004
  2. Irmen de Jong
    Replies:
    0
    Views:
    327
    Irmen de Jong
    Jan 8, 2005
  3. Robert Brewer
    Replies:
    4
    Views:
    3,665
    Irmen de Jong
    Jan 16, 2005
  4. Steven D'Aprano
    Replies:
    1
    Views:
    113
    Chris Angelico
    Jan 7, 2013
  5. Philipp Hagemeister
    Replies:
    0
    Views:
    148
    Philipp Hagemeister
    Jan 8, 2013
Loading...

Share This Page