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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,62ab88cac7a1dbb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.216.194.136 with SMTP id m8mr296569wen.2.1348233625050; Fri, 21 Sep 2012 06:20:25 -0700 (PDT) Path: q11ni9090881wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!feeder2.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!border2.nntp.dca.giganews.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.news.ucla.edu!nntp.club.cc.cmu.edu!feeder.erje.net!newsfeed.straub-nv.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Gnat Sockets & Streams Date: Sat, 15 Sep 2012 09:52:08 +0200 Organization: cbb software GmbH Message-ID: <6owmaht6knzo.brd5acsbbu7j$.dlg@40tude.net> References: <201209142101005065-rblove@airmailnet> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-09-15T09:52:08+02:00 List-Id: On Fri, 14 Sep 2012 21:01:00 -0500, Robert Love wrote: > We don't see any way the > > String'Output(Channel, "Dummy Data"); > > can output the data one character at a time. It could do this in any way and any combination of characters per definition of stream. AdaCore changed the behavior of array stream attributes, I heard. But, still, it is perfectly legal in any way. Using streams and sockets you should remember: 1. Stream attributes are not portable. The only type you should read/write into the socket stream is Unsigned_8 or equivalent (octet). 2. As with any I/O you should honestly implement all layers of the protocol at hand. Don't try shortcuts like stream type attributes, representation clauses etc. 3. Network protocols are packet-oriented. You have to use Write (of the type Root_Stream_Type) instead of attributes to ensure that the packet is sent as a whole. It matters for both UDP and TCP/IP. > Is there any way a stream can be corrupted? There is nothing corrupted in the described behavior. > Any settings parameters I could compile with that change the behavior? See above. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de