def write_fd(sock, fd):
    data = struct.pack(FMT, fd)
    return sock.sendmsg([b'1'], [(socket.SOL_SOCKET, socket.SCM_RIGHTS, data)])
Write a descriptor to the socket.
dataset/ETHPy150Open rspivak/csdesign/server04.py/write_fd