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)
| 546 | set_inheritable.__doc__ = "Set the inheritable flag of the socket" |
| 547 | |
| 548 | def 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 | |
| 557 | if hasattr(_socket.socket, "sendmsg"): |
| 558 | def send_fds(sock, buffers, fds, flags=0, address=None): |