From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8ee4430d1820a774 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT.Sockets: Timeval_Duration is in milliseconds? Date: Sun, 09 Dec 2007 22:51:09 +0000 Organization: Pushface Message-ID: References: <9d687056-c98b-405a-b166-afddac34f109@e67g2000hsc.googlegroups.com> <99906a58-2645-4880-bd13-9b63a30ffb59@e4g2000hsg.googlegroups.com> <8808f9fb-64a5-4a44-9684-dc0446a26bbc@b1g2000pra.googlegroups.com> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1197240670 26737 62.49.19.209 (9 Dec 2007 22:51:10 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Sun, 9 Dec 2007 22:51:10 +0000 (UTC) Cancel-Lock: sha1:NrCd1GHLhTnLRXrUSnIauyYtcr4= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (darwin) Xref: g2news1.google.com comp.lang.ada:18837 Date: 2007-12-09T22:51:09+00:00 List-Id: gpriv@axonx.com writes: > http://msdn2.microsoft.com/en-us/library/ms740532.aspx > > "Sets a timeout, in milliseconds, for blocking receive calls. The > default for this option is zero, which indicates that a receive > operation will not time out. If a blocking receive call times out, > the connection is in an indeterminate state and should be closed." So if you are using Windows, Microsoft's decision to screw things up by using a different socket argument structure from the pre-existing BSD argument structure means that the current GNAT code indeed works in milliseconds instead of the seconds it is trying to. I suppose we have to report this as a bug in GNAT though it would be much more satisfactory to have Microsoft fix it where it should be fixed. It could never have been the intention to have the effect you observe! Which version of GNAT are you using? Personally I've never used timeouts -- I've used select() and waited 'forever'.