comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Creem <jeff@thecreems.com>
Subject: Re: (Linux) GNAT socket exception - when setting No_Delay
Date: Wed, 19 Apr 2006 19:00:47 -0400
Date: 2006-04-19T19:00:47-04:00	[thread overview]
Message-ID: <r1sih3-r6f.ln1@newserver.thecreems.com> (raw)
In-Reply-To: <44469A6E.8090207@mailinator.com>

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).

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?



  reply	other threads:[~2006-04-19 23:00 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 [this message]
2006-04-20  6:44             ` Alex R. Mosteo
2006-04-20 19:32               ` AAFellow
2006-04-20  2:41         ` Gene
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