Re: (Linux) GNAT socket exception - when setting No_Delay
- From: "Gene" <gene.ressler@xxxxxxxxx>
- Date: 19 Apr 2006 19:41:57 -0700
AAFellow@xxxxxxxxxxx wrote:
I'm actually still getting the GNAT socket exception when setting the
No_Delay option when I run the code. (Ignore my previous reply - I
didn't realize that I still had the No_Delay code commented out.)
Is there a known issue with setting the No_Delay via GNAT.sockets when
running on Linux?
thanks!
I'm no expert, but have written enough sockets code to know the source
of Gnat.Sockets fairly well.
You didn't say what version you're running. Gnat.Sockets was refined
quite a bit over the last 2 or 3 years. The library header should be
1.27 or later.
You didn't say what exception you're getting. Socket_Error provides
additional information (through Ada.Exceptions) on what was returned by
the TCP/IP stack. That's probably where your answer lies.
As Dmitry says it probably can't be anything except a badly compiled
library or an errno being returned by the OS. This would have nothing
to do with Ada. Setting options does some straightfoward argument
setup and then calls the imported C setsockopt(). If the C call sets
errno, then GNAT.Ada immediately raises the Socket_Error exception.
So it's likely that your NIC driver or TCP stack is unable to process
the No_Delay request. Check the message in the exception! A wild
possibility is that on your system No_Delay can be set only by root
(like promiscuous mode) and you are not root.
.
- References:
- (Linux) GNAT socket exception - when setting No_Delay
- From: AAFellow@xxxxxxxxxxx
- Re: (Linux) GNAT socket exception - when setting No_Delay
- From: Robert A Duff
- Re: (Linux) GNAT socket exception - when setting No_Delay
- From: Alex R. Mosteo
- Re: (Linux) GNAT socket exception - when setting No_Delay
- From: AAFellow@xxxxxxxxxxx
- Re: (Linux) GNAT socket exception - when setting No_Delay
- From: AAFellow@xxxxxxxxxxx
- (Linux) GNAT socket exception - when setting No_Delay
- Prev by Date: Re: DLL troubles on Windows XP
- Next by Date: Re: (Linux) GNAT socket exception - when setting No_Delay
- Previous by thread: Re: (Linux) GNAT socket exception - when setting No_Delay
- Next by thread: Re: (Linux) GNAT socket exception - when setting No_Delay
- Index(es):
Relevant Pages
|