From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7VC9Oj1014862 for ; Wed, 31 Aug 2011 14:09:24 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4AAFsjXk7UGyoBkWdsb2JhbABChEyjfBQBAQEBCQsLBxQDIoFAAQEFI1YQCw4MAiYCAkkBDQYth1oCpxuSCoEshBiBEQSkLg X-IronPort-AV: E=Sophos;i="4.68,307,1312149600"; d="scan'208";a="117833435" Received: from smtp1-g21.free.fr ([212.27.42.1]) by mail1-smtp-roc.national.inria.fr with ESMTP; 31 Aug 2011 14:09:18 +0200 Received: from svungoc-latitude-d630.localnet (unknown [82.225.106.147]) by smtp1-g21.free.fr (Postfix) with ESMTP id 7303394019B; Wed, 31 Aug 2011 14:09:12 +0200 (CEST) From: Vu Ngoc San To: Gerd Stolpmann Date: Wed, 31 Aug 2011 14:09:09 +0200 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.6.2; x86_64; ; ) Cc: OCaml List References: <201108311255.19184.san.vu-ngoc@laposte.net> <1314788700.3496.213.camel@thinkpad> In-Reply-To: <1314788700.3496.213.camel@thinkpad> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Message-Id: <201108311409.10374.san.vu-ngoc@laposte.net> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p7VC9Oj1014862 Subject: Re: [Caml-list] nonblock socket in Windows that's good news for me, thanks ! I'm going to try. Maybe the ocaml manual could be updated on this point. San Le mercredi 31 août 2011 13:05:00, Gerd Stolpmann a écrit : > Am Mittwoch, den 31.08.2011, 12:55 +0200 schrieb Vu Ngoc San: > > Hello > > > > I want to have non-blocking sockets for a UDP client/server. I use > > the Unix.set_nonblock which works fine in Linux, but the manual tells > > me that in Windows (Win32): > > > > "set_nonblock, clear_nonblock implemented as dummy functions; use threads > > instead of non-blocking I/O" > > This is only partially correct. Non-blocking sockets are implemented, > and these functions work in Ocaml. For other types of file descriptors, > Windows doesn't provide non-blocking access. > > Gerd > > > I would like to avoid threads, and on the other hand there is the > > ioctlsocket function in Windows which seems to do it. So why isn't > > this implemented in ocaml ? > > > > http://msdn.microsoft.com/en-us/library/ms738573