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,8bbf2dbc48e08e2f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!m79g2000cwm.googlegroups.com!not-for-mail From: "lekktu@gmail.com" Newsgroups: comp.lang.ada Subject: Re: Question about Streams and UDP sockets using GNAT.Sockets Date: 19 Jul 2006 13:54:47 -0700 Organization: http://groups.google.com Message-ID: <1153342487.765307.77990@m79g2000cwm.googlegroups.com> References: <1153215666.455584.201990@m73g2000cwd.googlegroups.com> NNTP-Posting-Host: 62.57.56.235 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1153342493 1734 127.0.0.1 (19 Jul 2006 20:54:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 19 Jul 2006 20:54:53 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: m79g2000cwm.googlegroups.com; posting-host=62.57.56.235; posting-account=6KulzA0AAAAYgqXnq9bp1dTrVVTCLyvG Xref: g2news2.google.com comp.lang.ada:5825 Date: 2006-07-19T13:54:47-07:00 List-Id: Simon Wright wrote: > The only way I can see to get UDP working is > > (1) stream the record to be output to a memory stream,then write the > bytes of the stream to the socket stream in one go; This has been suggested, but it is overkill for my needs, as the UDP sockets are going to exchange only very simple String (or maybe Wide_String) data. > Personally I think that letting us get a Stream for a GNAT.Sockets > datagram socket is almost bound to result in error and shouldn't be > allowed, I couldn't persuade AdaCore of that! Yes, I agree. I've already gotten rid of the Stream stuff and I'm using Send_Socket and Receive_Socket directly. I'll use the streams for the TCP/IP connections, though. Thanks, Juanma