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,8a39a73d0242ca42 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: GNAT.Sockets. Blocking? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <158756da-21b7-4e2d-b288-7ba030f1f35c@25g2000yqb.googlegroups.com> Date: Wed, 24 Jun 2009 09:47:13 +0200 Message-ID: <1jvdvv1cyddwz.1csypk86qgqru.dlg@40tude.net> NNTP-Posting-Date: 24 Jun 2009 09:47:13 CEST NNTP-Posting-Host: 573c182f.newsspool2.arcor-online.net X-Trace: DXC=_6Q3me1Ga4L78PK[oJ2ng@A9EHlD;3YcB4Fo<]lROoRA^YC2XCjHcbI4XCjf8D;S`MDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBQoebg2=gD=K X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6588 Date: 2009-06-24T09:47:13+02:00 List-Id: On Tue, 23 Jun 2009 14:06:35 -0700 (PDT), Jacob M. H. Smith wrote: > Can't I just read as much as is available? Yes, you can, by reading one octet (byte) at a time. Since you don't know the logical packet size in advance, any incoming octet may indicate the packet end (when it contains LF, in the case of HTTP). Search for a earlier discussion in comp.lang.ada concerning reading "lines" from socket stream (or any other stream, if that matters). -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de