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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham 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!news1.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Alex R. Mosteo" Newsgroups: comp.lang.ada Subject: Re: (Linux) GNAT socket exception - when setting No_Delay Date: Thu, 20 Apr 2006 08:44:01 +0200 Message-ID: <44472DB1.2080008@mailinator.com> References: <1144964069.054981.163230@g10g2000cwb.googlegroups.com> <44438691.3050902@mailinator.com> <1145285458.008479.322090@v46g2000cwv.googlegroups.com> <1145476591.533890.317470@i39g2000cwa.googlegroups.com> <44469A6E.8090207@mailinator.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 5tMiBmrI9nHnqBnT5SO44whZz5TC5dUyIV/us2u+w/o/m2B6o= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news2.google.com comp.lang.ada:3874 Date: 2006-04-20T08:44:01+02:00 List-Id: Jeffrey Creem wrote: > Alex R. Mosteo wrote: > >> AAFellow@hotmail.com wrote: >> >>> Hey everyone, >>> >>> 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? >> >> >> >> I'm confused, is this No_Delay the flag used for non blocking IO? >> >> I used to do that with this code without issues: >> >> procedure Set_Blocking_Io (This: in Object; Enabled : Boolean := True) >> use Gnat; >> is >> Request : Sockets.Request_Type (Sockets.Non_Blocking_Io); >> begin >> Request.Enabled:= not Enabled; >> Sockets.Control_Socket(This.Socket, Request); >> end Set_Blocking_Io; >> >> where This of type Object was my higher level socket abstraction. > > > No delay is not related to blocking. It disables the TCP Nagle algorithm > (http://compnetworking.about.com/od/tcpip/l/bldef_nagle.htm). Ah ok, so I was totally out of the mark. :/ > Usually one does this when you want to send small messages via TCP with > minimal latency. > > Without it, small messages are often delayed about 200msec before being > transmitted. > > > Have you tried "AdaSockets" instead of GNAT sockets?