From: Anthony Baxter Date: Thu, 10 Jan 2002 10:04:04 +0000 (+0000) Subject: backport Fred's 1.58: X-Git-Tag: v2.1.2c1~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=879a049ecd6f9d9fb765f5e60ea0f42a052aa4f0;p=thirdparty%2FPython%2Fcpython.git backport Fred's 1.58: Added documentation of the sendall() method, and a note to the send() method that it does not guarantee that all data is sent. --- diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index fcd56e23c198..ac834fd7a2d7 100644 --- a/Doc/lib/libsocket.tex +++ b/Doc/lib/libsocket.tex @@ -370,6 +370,19 @@ same meaning as for \method{recv()} above. Send data to the socket. The socket must be connected to a remote socket. The optional \var{flags} argument has the same meaning as for \method{recv()} above. Returns the number of bytes sent. +Applications are responsible for checking that all data has been sent; +if only some of the data was transmitted, the application needs to +attempt delivery of the remaining data. +\end{methoddesc} + +\begin{methoddesc}[socket]{sendall}{string\optional{, flags}} +Send data to the socket. The socket must be connected to a remote +socket. The optional \var{flags} argument has the same meaning as for +\method{recv()} above. Unlike \method{send()}, this method continues +to send data from \var{string} until either all data has been sent or +an error occurs. \code{None} is returned on success. On error, an +exception is raised, and there is no way to determine how much data, +if any, was successfully sent. \end{methoddesc} \begin{methoddesc}[socket]{sendto}{string\optional{, flags}, address}