summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-12-05 05:25:59 (GMT)
committerFred Drake <fdrake@acm.org>2001-12-05 05:25:59 (GMT)
commit39368c1053ebf0acb6b76f4d34f225fcaf856daf (patch)
tree28355f89458cac58489d29474453bb8586489b2b /Doc
parent6d30c3e39110e90d90066208d1f05240d51f91e1 (diff)
downloadcpython-39368c1053ebf0acb6b76f4d34f225fcaf856daf.zip
cpython-39368c1053ebf0acb6b76f4d34f225fcaf856daf.tar.gz
cpython-39368c1053ebf0acb6b76f4d34f225fcaf856daf.tar.bz2
Added documentation of the sendall() method, and a note to the send() method
that it does not guarantee that all data is sent. This closes SF patch #474307.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libsocket.tex13
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex
index 8fd624c..0e3bc76 100644
--- a/Doc/lib/libsocket.tex
+++ b/Doc/lib/libsocket.tex
@@ -477,6 +477,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}