MCPcopy Index your code
hub / github.com/RustPython/RustPython / fromfd

Function fromfd

Lib/socket.py:548–555  ·  view source on GitHub ↗

fromfd(fd, family, type[, proto]) -> socket object Create a socket object from a duplicate of the given file descriptor. The remaining arguments are the same as for socket().

(fd, family, type, proto=0)

Source from the content-addressed store, hash-verified

546 set_inheritable.__doc__ = "Set the inheritable flag of the socket"
547
548def fromfd(fd, family, type, proto=0):
549 """ fromfd(fd, family, type[, proto]) -> socket object
550
551 Create a socket object from a duplicate of the given file
552 descriptor. The remaining arguments are the same as for socket().
553 """
554 nfd = dup(fd)
555 return socket(family, type, proto, nfd)
556
557if hasattr(_socket.socket, "sendmsg"):
558 def send_fds(sock, buffers, fds, flags=0, address=None):

Callers

nothing calls this directly

Calls 2

socketClass · 0.70
dupFunction · 0.50

Tested by

no test coverage detected