@@ -1139,6 +1139,32 @@ The :mod:`socket` module also offers various network-related services:
1139
1139
"Interface name" is a name as documented in :func: `if_nameindex `.
1140
1140
1141
1141
1142
+ .. function :: send_fds(sock, buffers, fds[, flags[, address]])
1143
+
1144
+ Send the list of file descriptors *fds * over an :const: `AF_UNIX ` socket *sock *.
1145
+ The *fds * parameter is a sequence of file descriptors.
1146
+ Consult :meth: `sendmsg ` for the documentation of these parameters.
1147
+
1148
+ .. availability :: Unix supporting :meth:`~socket.sendmsg` and :const:`SCM_RIGHTS` mechanism.
1149
+
1150
+ .. versionadded :: 3.9
1151
+
1152
+
1153
+ .. function :: recv_fds(sock, bufsize, maxfds[, flags])
1154
+
1155
+ Receive up to *maxfds * file descriptors from an :const: `AF_UNIX ` socket *sock *.
1156
+ Return ``(msg, list(fds), flags, addr) ``.
1157
+ Consult :meth: `recvmsg ` for the documentation of these parameters.
1158
+
1159
+ .. availability :: Unix supporting :meth:`~socket.recvmsg` and :const:`SCM_RIGHTS` mechanism.
1160
+
1161
+ .. versionadded :: 3.9
1162
+
1163
+ .. note ::
1164
+
1165
+ Any truncated integers at the end of the list of file descriptors.
1166
+
1167
+
1142
1168
.. _socket-objects :
1143
1169
1144
1170
Socket Objects
@@ -1633,29 +1659,6 @@ to sockets.
1633
1659
1634
1660
.. versionadded :: 3.6
1635
1661
1636
- .. method :: socket.send_fds(sock, buffers, fds[, flags[, address]])
1637
-
1638
- Send the list of file descriptors *fds * over an :const: `AF_UNIX ` socket.
1639
- The *fds * parameter is a sequence of file descriptors.
1640
- Consult :meth: `sendmsg ` for the documentation of these parameters.
1641
-
1642
- .. availability :: Unix supporting :meth:`~socket.sendmsg` and :const:`SCM_RIGHTS` mechanism.
1643
-
1644
- .. versionadded :: 3.9
1645
-
1646
- .. method :: socket.recv_fds(sock, bufsize, maxfds[, flags])
1647
-
1648
- Receive up to *maxfds * file descriptors. Return ``(msg, list(fds), flags, addr) ``. Consult
1649
- :meth: `recvmsg ` for the documentation of these parameters.
1650
-
1651
- .. availability :: Unix supporting :meth:`~socket.recvmsg` and :const:`SCM_RIGHTS` mechanism.
1652
-
1653
- .. versionadded :: 3.9
1654
-
1655
- .. note ::
1656
-
1657
- Any truncated integers at the end of the list of file descriptors.
1658
-
1659
1662
.. method :: socket.sendfile(file, offset=0, count=None)
1660
1663
1661
1664
Send a file until EOF is reached by using high-performance
0 commit comments