]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-28724: Doc: Move socket.send_fds and socket.recv_fds docs to right section (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 22 Apr 2021 04:32:40 +0000 (21:32 -0700)
committerGitHub <noreply@github.com>
Thu, 22 Apr 2021 04:32:40 +0000 (21:32 -0700)
(cherry picked from commit 660592f67c0d825b06eb4a38ccc04b34a1f01f00)

Co-authored-by: Saiyang Gou <gousaiyang@163.com>
Doc/library/socket.rst
Doc/whatsnew/3.9.rst

index 2fc170a0bc0bd30d2fd17ca387b382fd1dc759e8..26892c99268ba9f0877c0060c4e6b7cd0686769e 100755 (executable)
@@ -1139,6 +1139,32 @@ The :mod:`socket` module also offers various network-related services:
       "Interface name" is a name as documented in :func:`if_nameindex`.
 
 
+.. function:: send_fds(sock, buffers, fds[, flags[, address]])
+
+   Send the list of file descriptors *fds* over an :const:`AF_UNIX` socket *sock*.
+   The *fds* parameter is a sequence of file descriptors.
+   Consult :meth:`sendmsg` for the documentation of these parameters.
+
+   .. availability:: Unix supporting :meth:`~socket.sendmsg` and :const:`SCM_RIGHTS` mechanism.
+
+   .. versionadded:: 3.9
+
+
+.. function:: recv_fds(sock, bufsize, maxfds[, flags])
+
+   Receive up to *maxfds* file descriptors from an :const:`AF_UNIX` socket *sock*.
+   Return ``(msg, list(fds), flags, addr)``.
+   Consult :meth:`recvmsg` for the documentation of these parameters.
+
+   .. availability:: Unix supporting :meth:`~socket.recvmsg` and :const:`SCM_RIGHTS` mechanism.
+
+   .. versionadded:: 3.9
+
+   .. note::
+
+      Any truncated integers at the end of the list of file descriptors.
+
+
 .. _socket-objects:
 
 Socket Objects
@@ -1633,29 +1659,6 @@ to sockets.
 
    .. versionadded:: 3.6
 
-.. method:: socket.send_fds(sock, buffers, fds[, flags[, address]])
-
-   Send the list of file descriptors *fds* over an :const:`AF_UNIX` socket.
-   The *fds* parameter is a sequence of file descriptors.
-   Consult :meth:`sendmsg` for the documentation of these parameters.
-
-   .. availability:: Unix supporting :meth:`~socket.sendmsg` and :const:`SCM_RIGHTS` mechanism.
-
-   .. versionadded:: 3.9
-
-.. method:: socket.recv_fds(sock, bufsize, maxfds[, flags])
-
-   Receive up to *maxfds* file descriptors. Return ``(msg, list(fds), flags, addr)``. Consult
-   :meth:`recvmsg` for the documentation of these parameters.
-
-   .. availability:: Unix supporting :meth:`~socket.recvmsg` and :const:`SCM_RIGHTS` mechanism.
-
-   .. versionadded:: 3.9
-
-   .. note::
-
-      Any truncated integers at the end of the list of file descriptors.
-
 .. method:: socket.sendfile(file, offset=0, count=None)
 
    Send a file until EOF is reached by using high-performance
index d5eaccacde67a9370efa1fb11702da85422afc7f..b39fdb5efdf51a170b7f3f5f292cd44810bbf03c 100644 (file)
@@ -658,7 +658,7 @@ The socket module now supports the :data:`~socket.CAN_J1939` protocol on
 platforms that support it.  (Contributed by Karl Ding in :issue:`40291`.)
 
 The socket module now has the :func:`socket.send_fds` and
-:func:`socket.recv.fds` methods. (Contributed by Joannah Nanjekye, Shinya
+:func:`socket.recv_fds` functions. (Contributed by Joannah Nanjekye, Shinya
 Okano and Victor Stinner in :issue:`28724`.)