From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id A134A7ED7A for ; Fri, 14 Sep 2012 15:52:31 +0200 (CEST) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of romain.bardou@inria.fr) identity=pra; client-ip=178.32.228.5; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="romain.bardou@inria.fr"; x-sender="romain.bardou@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of romain.bardou@inria.fr) identity=mailfrom; client-ip=178.32.228.5; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="romain.bardou@inria.fr"; x-sender="romain.bardou@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mo5.mail-out.ovh.net) identity=helo; client-ip=178.32.228.5; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="romain.bardou@inria.fr"; x-sender="postmaster@mo5.mail-out.ovh.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArUBAPI1U1CyIOQFnGdsb2JhbABFhUC2PSIBAQEBAQgLCQkUJ4JfQD0WGAMCAQIBNwEgCAKICQQHmXGhPo5egx8DlWGBFIRujQc X-IronPort-AV: E=Sophos;i="4.80,423,1344204000"; d="scan'208";a="173212579" Received: from mo5.mail-out.ovh.net ([178.32.228.5]) by mail1-smtp-roc.national.inria.fr with ESMTP; 14 Sep 2012 15:52:31 +0200 Received: from mail30.ha.ovh.net (b6.ovh.net [213.186.33.56]) by mo5.mail-out.ovh.net (Postfix) with SMTP id 60593FFB268 for ; Fri, 14 Sep 2012 15:58:09 +0200 (CEST) Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 14 Sep 2012 15:52:30 +0200 Received: from unknown (HELO ?138.231.81.39?) (romain%bardou.fr@138.231.81.39) by ns0.ovh.net with SMTP; 14 Sep 2012 15:52:29 +0200 Message-ID: <505336D4.7010700@inria.fr> Date: Fri, 14 Sep 2012 15:53:24 +0200 From: Romain Bardou User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 MIME-Version: 1.0 To: caml-list@inria.fr X-Ovh-Mailout: 178.32.228.5 (mo5.mail-out.ovh.net) Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 3935301649689250336 X-Ovh-Remote: 138.231.81.39 () X-Ovh-Local: 213.186.33.20 (ns0.ovh.net) X-OVH-SPAMSTATE: OK X-OVH-SPAMSCORE: 0 X-OVH-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehtddrieehucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecunecuhfhrohhmpeftohhmrghinhcuuegrrhguohhuuceorhhomhgrihhnrdgsrghrughouhesihhnrhhirgdrfhhrqeenucffohhmrghinhepihhnrhhirgdrfhhrnecujfgurhepkfffhfgfggfvufgtgfesthejrgdttdefud X-Spam-Check: DONE|U 0.5/N X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeehtddrieehucetufdoteggodetrfcurfhrohhfihhlvgemucfqggfjnecuuegrihhlohhuthemuceftddtnecunecuhfhrohhmpeftohhmrghinhcuuegrrhguohhuuceorhhomhgrihhnrdgsrghrughouhesihhnrhhirgdrfhhrqeenucffohhmrghinhepihhnrhhirgdrfhhrnecujfgurhepkfffhfgfggfvufgtgfesthejrgdttdefud X-Validation-by: romain.bardou@inria.fr Subject: [Caml-list] Unix.connect for non-blocking sockets on Windows Hello, It seems, from the manual[1] that sockets of the Unix module are fully implemented on Windows. It also seems, from other googling, that non-blocking sockets are also implemented. [1] http://caml.inria.fr/pub/docs/manual-ocaml/manual036.html However, when I run the Unix.connect command on Windows, I get: Unix_error(EWOULDBLOCK, "connect", "") I'm using OCaml 3.12.1 on Windows using the (older) installer from Jonathan, which uses mingw if I'm not mistaken. The code I use is more or less equivalent to: open Unix let address = "xxx.xxx.xxx.xxx" in (* some IP for IPv4 *) let port = 9543 in let fd = socket PF_INET SOCK_STREAM 0 in set_nonblock fd; connect fd (ADDR_INET (Unix.inet_addr_of_string address, port)) Is this a known issue? Thanks, -- Romain Bardou