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,7e490a18b9688bd9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.58.162 with SMTP id s2mr1343371pbq.20.1316474569622; Mon, 19 Sep 2011 16:22:49 -0700 (PDT) MIME-Version: 1.0 Path: lh7ni747pbb.0!nntp.google.com!news1.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Stream_Element_Array Date: Mon, 19 Sep 2011 18:22:45 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1e6rw4vto3ldb.i8d7fxixapx4.dlg@40tude.net> <28u4e86fk8gn$.ialexttobgr0$.dlg@40tude.net> <276b8d0a-5b3c-4559-a275-98620657cc2f@s30g2000pri.googlegroups.com> <01c12338-e9f8-49ab-863d-c8282be3875e@g31g2000yqh.googlegroups.com> <1esmml9qftomp.vihelaijmcar$.dlg@40tude.net> <02671fc7-5c38-42dc-8017-529f6dead8fd@j19g2000yqc.googlegroups.com> <631f3859-8118-4f4c-a684-152ee5f589bf@o15g2000vbe.googlegroups.com> <1ha21cmm4ub0x.1x5tkefenjm53$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1316474568 18191 69.95.181.76 (19 Sep 2011 23:22:48 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 19 Sep 2011 23:22:48 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: news1.google.com comp.lang.ada:18035 Date: 2011-09-19T18:22:45-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:1ha21cmm4ub0x.1x5tkefenjm53$.dlg@40tude.net... ... > As for S'Write, in particular note that most of the underlying transports, > upon which the stream would operate, are packet-oriented. RS232 is a dying > minority. So you would really wish to send outgoing logical packets whole, > in order to allow the lower levels to handle them as whole physical > packets. As an example, consider TCP/IP. If you wanted to make > TCP_NO_DELAY > option working, you would have to respect packet boundaries. I.e. the > right > way to handle stream protocols is to use Write (S, Packet) instead. I agree (I think). For Claw, we used a "marshalling" stream type; the stream attributes typically read/wrote directly from that. When the entire object was "marshalled", then the resulting array of stream elements was written at once to whatever. For things like sockets, that's a good idea; but for things like the clipboard and the registry, that was absolutely required. (By treating the clipboard and registry as a stream, we can easily support storing and reading anything at all in them, which would be hard to do preserving strong typing otherwise.) Randy.