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,7db5fb0599fd4b76 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!z14g2000cwz.googlegroups.com!not-for-mail From: "fabio de francesco" Newsgroups: comp.lang.ada Subject: Re: TCP/IP Sockets with GNAT.Sockets Date: 2 May 2005 13:22:41 -0700 Organization: http://groups.google.com Message-ID: <1115065361.677409.82970@z14g2000cwz.googlegroups.com> References: <1115001752.291144.218410@z14g2000cwz.googlegroups.com> <427618e9$0$7743$ba620e4c@news.skynet.be> <1115045740.838321.306480@g14g2000cwa.googlegroups.com> <1115062753.107263.233720@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 80.181.52.213 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1115065366 1154 127.0.0.1 (2 May 2005 20:22:46 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 2 May 2005 20:22:46 +0000 (UTC) In-Reply-To: <1115062753.107263.233720@z14g2000cwz.googlegroups.com> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: z14g2000cwz.googlegroups.com; posting-host=80.181.52.213; posting-account=Lp02jQ0AAABMd3TAghNf0TM2YBZqD_JE Xref: g2news1.google.com comp.lang.ada:10884 Date: 2005-05-02T13:22:41-07:00 List-Id: Bj=F6rn wrote: > > If you read g-socket.ads you won't find any usage example either of > the > > above mentioned functions or related parameters. > > I agree that the documentation of g-sockets could have been a bit more > verbose. > Having just completed a program that uses a lot of stuff from g-sockets > I learned two things the hard way: > * Using g-socket streams to send records does not guarantee that the > whole record will be sent in one TCP frame. TCP is a byte-stream protocol with NO record boundaries. When reading from a TCP socket in a C program we have always to code the read() in a loop and terminate only when no more characters are read (function returns value 0 of type "ssize_t" that could be an Integer in Ada I suppose). > * UDP/Broadcast does not work well with g-sockets streams. > > If you are planning to do any serious work with sockets I would > recommend to go with Send/Receive instead. Are Send/Receive Ada functions? > Best regards > Bj=F6rn Ciao, fabio de francesco