]> granicus.if.org Git - python/commitdiff
Bug #756104: document that bufsize in socket.recv() should be small
authorGeorg Brandl <georg@python.org>
Mon, 26 Dec 2005 23:07:46 +0000 (23:07 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 26 Dec 2005 23:07:46 +0000 (23:07 +0000)
Doc/lib/libsocket.tex

index 51c4a2fc5f5f99d5c4134811f5d6bca01c0b9d29..e3d9a92a85b4d9b8f3b33618bb7e3385cc901250 100644 (file)
@@ -557,6 +557,8 @@ the data received.  The maximum amount of data to be received
 at once is specified by \var{bufsize}.  See the \UNIX{} manual page
 \manpage{recv}{2} for the meaning of the optional argument
 \var{flags}; it defaults to zero.
+\note{For best match with hardware and network realities, the value of 
+\var{bufsize} should be a relatively small power of 2, for example, 4096.}
 \end{methoddesc}
 
 \begin{methoddesc}[socket]{recvfrom}{bufsize\optional{, flags}}