MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / fromfd

Function fromfd

tools/python-3.11.9-amd64/Lib/socket.py:540–547  ·  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

538 set_inheritable.__doc__ = "Set the inheritable flag of the socket"
539
540def fromfd(fd, family, type, proto=0):
541 """ fromfd(fd, family, type[, proto]) -> socket object
542
543 Create a socket object from a duplicate of the given file
544 descriptor. The remaining arguments are the same as for socket().
545 """
546 nfd = dup(fd)
547 return socket(family, type, proto, nfd)
548
549if hasattr(_socket.socket, "sendmsg"):
550 import array

Callers

nothing calls this directly

Calls 1

socketClass · 0.85

Tested by

no test coverage detected