comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal Obry <pascal@obry.net>
To: "Jacob M. H. Smith" <jacob.m.h.smith@googlemail.com>
Subject: Re: GNAT.Sockets. Blocking?
Date: Wed, 24 Jun 2009 17:14:54 +0200
Date: 2009-06-24T17:14:54+02:00	[thread overview]
Message-ID: <4A4242EE.3010302@obry.net> (raw)
In-Reply-To: <158756da-21b7-4e2d-b288-7ba030f1f35c@25g2000yqb.googlegroups.com>

Jacob,

Not so simple. It all depends on the headers sent back for the web page
your are requesting. If you have a size you need to read the exact
number of bytes. If you have not the size and you have a chunked
transfer encoding you need to read each chunk (see RFC for format) and
catenate the result.

So to keep the connection open you of course do not want to send the
"Connection: close" header. But in this case you must obey the server
headers values.

A good way to learn all this is to read the RFC and the AWS code which
handles all those cases.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B



  parent reply	other threads:[~2009-06-24 15:14 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
2009-06-24 13:32 ` anon
2009-06-24 14:03 ` anon
2009-06-24 15:14 ` Pascal Obry [this message]
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