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