comp.lang.ada
 help / color / mirror / Atom feed
From: gpriv@axonx.com
Subject: Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
Date: Sun, 9 Dec 2007 15:27:32 -0800 (PST)
Date: 2007-12-09T15:27:32-08:00	[thread overview]
Message-ID: <ffe83e08-568a-417d-bae0-f8a1b71a25fa@w56g2000hsf.googlegroups.com> (raw)
In-Reply-To: m2y7c3h482.fsf@mac.com

On Dec 9, 5:51 pm, Simon Wright <simon.j.wri...@mac.com> wrote:
> gp...@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'.

Isn't MS always making things "Better" without us even knowing it :-)

I use GPS 4.1.3 (20070913), GNAT GPL 2007 (20070405-41)

I prefer sockets with timeouts since the application is monitoring
many (1..100) "field" devices and it is written around abstract device
interfaces. Sets with only one socket seems to be overcomplication,
besides I am not sure that timeouts there are not screwed-up on
windows either.  Those devices send data at least every second, but
may "die" quietly and unexpectedly and that should be detected in
short order.  Timeout works fine when numbers are right.  It may be
good idea to fix windows version of GNAT though.

Regards,

George





  reply	other threads:[~2007-12-09 23:27 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-08 19:45 GNAT.Sockets: Timeval_Duration is in milliseconds? gpriv
2007-12-08 22:11 ` Simon Wright
2007-12-08 22:34   ` gpriv
2007-12-09  1:45     ` tmoran
2007-12-09  9:33       ` Dmitry A. Kazakov
2007-12-09 12:50         ` Gautier
2007-12-09 13:37           ` Dmitry A. Kazakov
2007-12-09 14:59             ` Martin Krischik
2007-12-09 17:24               ` Dmitry A. Kazakov
2007-12-09 15:55         ` gpriv
2007-12-09 17:25           ` Dmitry A. Kazakov
2007-12-09 18:26     ` Simon Wright
2007-12-09 19:36       ` gpriv
2007-12-09 22:51         ` Simon Wright
2007-12-09 23:27           ` gpriv [this message]
2007-12-10 20:06             ` Simon Wright
2007-12-10 21:02               ` gpriv
2007-12-11 20:33                 ` Simon Wright
2007-12-13  3:44                   ` gpriv
2007-12-13 13:13                     ` Simon Wright
2007-12-13 14:32                       ` gpriv
2007-12-09 19:46       ` tmoran
2007-12-09  9:01   ` Martin Krischik
2007-12-09  9:32 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox