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,865c3d125a8dbc3b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!wn11feed!worldnet.att.net!bgtnsc05-news.ops.worldnet.att.net.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada From: anon@anon.org (anon) Subject: Re: Howto read line from a stream Reply-To: anon@anon.org (anon) References: <83317a97-dae5-4c84-a1ac-88a87833cf3f@q14g2000vbn.googlegroups.com> X-Newsreader: IBM NewsReader/2 2.0 Message-ID: <%50Vl.310794$4m1.91910@bgtnsc05-news.ops.worldnet.att.net> Date: Tue, 02 Jun 2009 02:27:07 GMT NNTP-Posting-Host: 12.64.234.154 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1243909627 12.64.234.154 (Tue, 02 Jun 2009 02:27:07 GMT) NNTP-Posting-Date: Tue, 02 Jun 2009 02:27:07 GMT Organization: AT&T Worldnet Xref: g2news2.google.com comp.lang.ada:6170 Date: 2009-06-02T02:27:07+00:00 List-Id: Try the "PingPong" program that has been commented in the GNAT.SOCKETS specs ( g-socket.ads ). Some editiing is required. Like setting the IP to 127.0.0.1 local loopback and removing some if not all "Set_Socket_Option" statements, (some OSs have problems with these statements). In <83317a97-dae5-4c84-a1ac-88a87833cf3f@q14g2000vbn.googlegroups.com>, Tomek Walkuski writes: >Hi group, > >I have a stream, which is defined as: >Channel : Stream_Access; > >This stream is associated with a socket. If I knew how long is input >message I could do: >Msg : String (1 .. Known_Length); >String'Read (Channel, Msg); > >Is there any smart solution? Or should I read character by character >from a stream until I get CR & LF ?