Re: (Linux) GNAT socket exception - when setting No_Delay



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.

.



Relevant Pages

  • Re: threading IOError
    ... Tim Peters prognosticated that there was a bug in an extension module, ... errno is set but the failure return from the routine setting ... What then happens is the next time an exception gets propagated through ...
    (comp.lang.python)
  • Signal Problem
    ... For some reasons when an MCH3601 message is signaled, the exception ... This is the sample program, the pointer passed to setsppfp function doen't point tu anything so an MCH3601 is raised by setsppfp function, so the output is: ... void my_signal_handler(int sig) { ... errno = EFAULT; ...
    (comp.sys.ibm.as400.misc)
  • Re: Exception Handling - Professionally
    ... Subroutine that returns a value or an exception on failure, ... would hope that Foo::Bar is a subclass of Foo. ... So I have library foo, it could throw an exception from ... using something that sets errno, ...
    (perl.beginners)
  • Re: Tomcat - Internal Server Error 500
    ... The root cause is NoClassDefFoundError (shown ... internal error 500. ... error, upon pressing submit. ... It shows the following exception: ...
    (comp.lang.java.help)
  • Re: Java and buffer overflows
    ... What happened here is that the JavaVM caught an exception while parsing ... > passed user input to a buffer but the compiler kept barking at me so ... > [root@rcmqa5 root]# javac test.java ...
    (Vuln-Dev)