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 autolearn=ham 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!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!skynet.be!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Question about Streams and UDP sockets using GNAT.Sockets Date: Wed, 19 Jul 2006 19:50:11 +0100 Organization: Pushface Message-ID: References: <1153215666.455584.201990@m73g2000cwd.googlegroups.com> <1fpj192j49rf4$.ma23qkoukku3.dlg@40tude.net> <4i3r3nF215adU1@individual.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1153335009 28417 62.49.19.209 (19 Jul 2006 18:50:09 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Wed, 19 Jul 2006 18:50:09 +0000 (UTC) Cancel-Lock: sha1:+YwQY8Gn9uGBFwTWERrrLnQKnhM= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:5820 Date: 2006-07-19T19:50:11+01:00 List-Id: "Randy Brukardt" writes: > If the type you are sending is more complex than a simple array, you > probably should try to use 'Write (Unchecked_Conversion won't > necessarily work on complex types). The best way to do it is to > create a buffer stream type that simply puts the bytes in a > Stream_Element_Array. Then use the direct call to the Write > procedure of the socket stream. > > We include such a type in Claw for this very reason. There is also one in the Booch Components (http://booch95.sourceforge.net/) at BC.Support.Memory_Streams.