From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,89bcac6751c47fb0 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!z34g2000cwc.googlegroups.com!not-for-mail From: "Gene" Newsgroups: comp.lang.ada Subject: Re: (Linux) GNAT socket exception - when setting No_Delay Date: 19 Apr 2006 19:41:57 -0700 Organization: http://groups.google.com Message-ID: <1145500917.005087.197950@z34g2000cwc.googlegroups.com> References: <1144964069.054981.163230@g10g2000cwb.googlegroups.com> <44438691.3050902@mailinator.com> <1145285458.008479.322090@v46g2000cwv.googlegroups.com> <1145476591.533890.317470@i39g2000cwa.googlegroups.com> NNTP-Posting-Host: 70.101.174.178 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1145500922 11322 127.0.0.1 (20 Apr 2006 02:42:02 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 20 Apr 2006 02:42:02 +0000 (UTC) In-Reply-To: <1145476591.533890.317470@i39g2000cwa.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: z34g2000cwc.googlegroups.com; posting-host=70.101.174.178; posting-account=ZFTPUQ0AAABW8AYEou9RtrBd-zTxz0_y Xref: g2news2.google.com comp.lang.ada:3873 Date: 2006-04-19T19:41:57-07:00 List-Id: 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.