From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p7VB5C9C012145 for ; Wed, 31 Aug 2011 13:05:12 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Au4AAF0UXk7U4xEKkGdsb2JhbABChEyjfBQBAQEBCQkNBxQDIoFAAQEEASNWEAsaAiYCAkkBDQYTCYdpAgKmbJILgSyEGIERBIwNjCaLew X-IronPort-AV: E=Sophos;i="4.68,306,1312149600"; d="scan'208";a="107219205" Received: from moutng.kundenserver.de ([212.227.17.10]) by mail4-smtp-sop.national.inria.fr with ESMTP; 31 Aug 2011 13:05:11 +0200 Received: from office1.lan.sumadev.de (dslb-094-219-211-217.pools.arcor-ip.net [94.219.211.217]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Mhekt-1QcUso2JL1-00MKAY; Wed, 31 Aug 2011 13:05:01 +0200 Received: from [192.168.1.111] (546BF154.cm-12-4d.dynamic.ziggo.nl [84.107.241.84]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 1E4DEC00C7; Wed, 31 Aug 2011 13:05:01 +0200 (CEST) From: Gerd Stolpmann To: Vu Ngoc San Cc: OCaml List In-Reply-To: <201108311255.19184.san.vu-ngoc@laposte.net> References: <201108311255.19184.san.vu-ngoc@laposte.net> Content-Type: text/plain; charset="UTF-8" Date: Wed, 31 Aug 2011 13:05:00 +0200 Message-ID: <1314788700.3496.213.camel@thinkpad> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:vrhu/df/JqyEMrkybS1o5BBefx+4hlKBXGPJZG/1hJh Rrup+oQaDpPhQB4pEV4LIInLC4MKm06GBQC//NJa+q7cIf7gPi Zy0r4OMiytFwJSoGqiPGmj5L5Z5PApOfS+hNwBSSyT9amdhNaz 5HCpf3vkyU+3cROCbzq8rRVOQJMafnA4D7Zp+vVm4Y0mTKB5ID oKrRpilkZAwr9aJ/h/RCt7Q0ay2eoa8FLrLb4XhvDJXqZbkrRU fae3fIzS3Vo7JI/08oSx1UxEAFMdoVcSHG0C4O/o0xkvuMAEpl yrmIJFxrk97fUfLp97SBQnVIgynM5Ev35V9LBuNIXI/HeHG3fl A/D5QfzOwgDTqTBPdBBqev5wd0GT0DTrc4Jxh7UlJ Subject: Re: [Caml-list] nonblock socket in Windows 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 > > -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de Creator of GODI and camlcity.org. Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de *** Searching for new projects! Need consulting for system *** programming in Ocaml? Gerd Stolpmann can help you. ------------------------------------------------------------