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)
| 555 | set_inheritable.__doc__ = "Set the inheritable flag of the socket" |
| 556 | |
| 557 | def fromfd(fd, family, type, proto=0): |
| 558 | """ fromfd(fd, family, type[, proto]) -> socket object |
| 559 | |
| 560 | Create a socket object from a duplicate of the given file |
| 561 | descriptor. The remaining arguments are the same as for socket(). |
| 562 | """ |
| 563 | nfd = dup(fd) |
| 564 | return socket(family, type, proto, nfd) |
| 565 | |
| 566 | if hasattr(_socket.socket, "sendmsg"): |
| 567 | def send_fds(sock, buffers, fds, flags=0, address=None): |
nothing calls this directly
no test coverage detected
searching dependent graphs…