comp.lang.ada
 help / color / mirror / Atom feed
From: "Gene" <gene.ressler@gmail.com>
Subject: Re: (Linux) GNAT socket exception - when setting No_Delay
Date: 19 Apr 2006 19:41:57 -0700
Date: 2006-04-19T19:41:57-07:00	[thread overview]
Message-ID: <1145500917.005087.197950@z34g2000cwc.googlegroups.com> (raw)
In-Reply-To: <1145476591.533890.317470@i39g2000cwa.googlegroups.com>

AAFellow@hotmail.com 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.




  parent reply	other threads:[~2006-04-20  2:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-13 21:34 (Linux) GNAT socket exception - when setting No_Delay AAFellow
2006-04-14  1:20 ` Robert A Duff
2006-04-17 12:14   ` Alex R. Mosteo
2006-04-17 14:50     ` AAFellow
2006-04-19 16:41       ` Jeffrey R. Carter
2006-04-19 19:56       ` AAFellow
2006-04-19 20:15         ` Alex R. Mosteo
2006-04-19 23:00           ` Jeffrey Creem
2006-04-20  6:44             ` Alex R. Mosteo
2006-04-20 19:32               ` AAFellow
2006-04-20  2:41         ` Gene [this message]
2006-04-14  9:22 ` 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