comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GNAT.Sockets. Blocking?
Date: Wed, 24 Jun 2009 09:47:13 +0200
Date: 2009-06-24T09:47:13+02:00	[thread overview]
Message-ID: <1jvdvv1cyddwz.1csypk86qgqru.dlg@40tude.net> (raw)
In-Reply-To: 158756da-21b7-4e2d-b288-7ba030f1f35c@25g2000yqb.googlegroups.com

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



  parent reply	other threads:[~2009-06-24  7:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-23 21:06 GNAT.Sockets. Blocking? Jacob M. H. Smith
2009-06-24  0:14 ` John B. Matthews
2009-06-24  4:55   ` Jacob M. H. Smith
2009-06-24 14:36     ` John B. Matthews
2009-06-24  7:47 ` Dmitry A. Kazakov [this message]
2009-06-24 13:32 ` anon
2009-06-24 14:03 ` anon
2009-06-24 15:14 ` Pascal Obry
2009-06-24 18:44 ` Simple solution was " anon
2009-06-24 18:47 ` Per Sandberg
2009-06-24 19:51   ` Pascal Obry
2009-06-24 22:12   ` Jeffrey R. Carter
2009-06-25 17:30     ` Jacob M. H. Smith
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox