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,FREEMAIL_FROM, FREEMAIL_REPLY 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: g2news1.google.com!news2.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: Mon, 17 Apr 2006 14:14:09 +0200 Message-ID: <44438691.3050902@mailinator.com> References: <1144964069.054981.163230@g10g2000cwb.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net XoxNs9XwZBGX3O1DmwNPWQwhqXaZH+k+dgv1vmgH4gzuc4bZM= User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en In-Reply-To: Xref: g2news1.google.com comp.lang.ada:3845 Date: 2006-04-17T14:14:09+02:00 List-Id: Robert A Duff wrote: > "AAFellow@hotmail.com" writes: > > >>Hi Guys, >> >>I'm porting some Ada code from Windows to Linux and I'm getting an >>exception that's caused by the code that tries to set the "No_Delay" >>option. This worked fine on windows...is there any reason it doesn't >>seem to work on Linux? >> >>I'm trying to research this myself now, but any info or anything you >>can do to point me in the right direction would really be appreciated. >>Thanks!! > > > I don't know about this particular case, but I have noticed different > behavior of sockets between windows and linux. Especially in > error-condition cases. I don't think that's the fault of the Ada > sockets implementation -- I think the underlying operating systems > just do subtly different things. I was able to write portable code, > but only by experimenting with both operating systems. Reading > documentation didn't always help, here (sigh!). I concur here. When using non blocking sockets, be prepared to get different exceptions in windows and in linux. Also detecting if a socket connection had succeeded or was still alive was tricky. As Robert wrote, it was a matter of having both systems at hand.