From 846e858bdc2e66d828411949dfac7988aa15c122 Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Mon, 31 Aug 2020 13:03:30 -0700 Subject: [PATCH] socket: add send_fds, recv_fds (#4501) --- stdlib/2and3/socket.pyi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stdlib/2and3/socket.pyi b/stdlib/2and3/socket.pyi index 7ab6a75a0..f016576b2 100644 --- a/stdlib/2and3/socket.pyi +++ b/stdlib/2and3/socket.pyi @@ -794,6 +794,13 @@ def inet_ntoa(packed_ip: bytes) -> str: ... def inet_pton(address_family: int, ip_string: str) -> bytes: ... def inet_ntop(address_family: int, packed_ip: bytes) -> str: ... +if sys.version_info >= (3, 9): + # flags and address appear to be unused in send_fds and recv_fds + def send_fds( + sock: socket, buffers: Iterable[bytes], fds: Union[bytes, Iterable[int]], flags: int = ..., address: None = ... + ) -> int: ... + def recv_fds(sock: socket, bufsize: int, maxfds: int, flags: int = ...) -> Tuple[bytes, List[int], int, Any]: ... + if sys.version_info >= (3, 3): def CMSG_LEN(length: int) -> int: ... def CMSG_SPACE(length: int) -> int: ...