From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA01425; Wed, 19 Feb 2003 13:45:32 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA01397 for caml-list@pauillac.inria.fr; Wed, 19 Feb 2003 13:45:31 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA00717 for ; Wed, 19 Feb 2003 13:25:39 +0100 (MET) Received: from mail1.telekom.de (mail1.telekom.de [62.225.183.235]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h1JCPcT15125 for ; Wed, 19 Feb 2003 13:25:38 +0100 (MET) Received: from g9jbr.mgb01.telekom.de by G8SBV.dmz.telekom.de with ESMTP; Wed, 19 Feb 2003 13:23:56 +0100 Received: by G9JBR.mgb01.telekom.de with Internet Mail Service (5.5.2653.19) id ; Wed, 19 Feb 2003 13:23:55 +0100 Message-Id: From: "Beck01, Wolfgang" To: altavillasalvatore@libero.it, caml-list@inria.fr Subject: RE: [Caml-list] TIME-OUT Date: Wed, 19 Feb 2003 13:23:55 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk altavillasalvatore@libero.it wrote > I would want to introduce a Timeout for input operations (a floating-point value > representing a time in seconds) of 15 second. use 'select': let rd_ready, wr_ready, exc_ready = select [sock] [][] 15.0 in match rd_ready with h :: _ -> Unix.recvfrom h !buf 0 max [] | [] -> (* handle timeout *) 'select' on Windows is restricted to sockets, on Unix you can use any file_descr. -- Wolfgang Beck T-Systems Nova GmbH ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners