Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: gpriv@xxxxxxxxx
- Date: Sun, 9 Dec 2007 15:27:32 -0800 (PST)
On Dec 9, 5:51 pm, Simon Wright <simon.j.wri...@xxxxxxx> wrote:
gp...@xxxxxxxxx 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
.
- Follow-Ups:
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: Simon Wright
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- References:
- GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: gpriv
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: Simon Wright
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: gpriv
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: Simon Wright
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: gpriv
- Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- From: Simon Wright
- GNAT.Sockets: Timeval_Duration is in milliseconds?
- Prev by Date: Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- Next by Date: Re: using svn in GPS on Windows == wonky
- Previous by thread: Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- Next by thread: Re: GNAT.Sockets: Timeval_Duration is in milliseconds?
- Index(es):
Relevant Pages
|