123456789101112131415161718192021222324252627(*
* Copyright (C) 2006-2009 Citrix Systems Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*)exceptionUnix_errorofintlet_=Callback.register_exception"fd_send_recv.unix_error"(Unix_error(0))externalsend_fd:Unix.file_descr->bytes->int->int->Unix.msg_flaglist->Unix.file_descr->int="stub_unix_send_fd_bytecode""stub_unix_send_fd"externalrecv_fd:Unix.file_descr->bytes->int->int->Unix.msg_flaglist->int*Unix.sockaddr*Unix.file_descr="stub_unix_recv_fd"letsend_fd_substringchannel_fdbufofslenflagsfd_to_send=send_fdchannel_fd(Bytes.unsafe_of_stringbuf)ofslenflagsfd_to_sendletfd_of_int(x:int):Unix.file_descr=Obj.magicxletint_of_fd(x:Unix.file_descr):int=Obj.magicx