🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1097

Re: TIdHTTPClient read blocking when keep-alive is enabled

#1097
From: emerson.pardo
Date: Mon, 07 May 2007 18:00
29 lines
2374 bytes
On 7 maio, 14:23, "Remy Lebeau \(TeamB\)" <no.s...@no.spam.com> wrote:
> <emerson.pa...@gmail.com> wrote in message
>
> news:1178554180.638229.240770@e65g2000hsc.googlegroups.com...
>
> > IdHTTP -> ProtocolVersion << pv1_1;
>
> ProtocolVersion is not a Set.  You need to use the '=' operator
> instead:
>
>     IdHTTP -> ProtocolVersion = pv1_1;

Oops! Thanks!

> >         // next lines replace IdHTTP -> Get("http://localhost:81")
>
> Why are you replacing Get()?  You should not be doing that at all.
> You are completely bypassing everything TIdHTTP handles for you about
> the HTTP protocol.  Your code is much to minimal to handle HTTP
> properly.

My server produce data asynchronously and I need my client to keep
connected and consume the data when it is available (in my code sample
I check this availability every 100 ms). I search for an IO event
handler but I didn't find any. So I coded the solution above. If there
is some better solution I'll be glad to know it! :-)

Thanks again,
Emerson
Technical Details
Message-ID: <1178560852.391723.170240@l77g2000hsb.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!l77g2000hsb.googlegroups.com!not-for-mail
References: <1178218514.079295.14020@q75g2000hsh.googlegroups.com> <1178554180.638229.240770@e65g2000hsc.googlegroups.com> <463f6182$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,cb0a8671aaf0de86
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!l77g2000hsb.googlegroups.com!not-for-mail
From: emerson.pardo@gmail.com
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: TIdHTTPClient read blocking when keep-alive is enabled
Date: 7 May 2007 11:00:52 -0700
Organization: http://groups.google.com
Lines: 30
Message-ID: <1178560852.391723.170240@l77g2000hsb.googlegroups.com>
References: <1178218514.079295.14020@q75g2000hsh.googlegroups.com>
   <1178554180.638229.240770@e65g2000hsc.googlegroups.com>
   <463f6182$1@newsgroups.borland.com>
NNTP-Posting-Host: 201.20.201.226
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1178560852 23998 127.0.0.1 (7 May 2007 18:00:52 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 7 May 2007 18:00:52 +0000 (UTC)
In-Reply-To: <463f6182$1@newsgroups.borland.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: l77g2000hsb.googlegroups.com; posting-host=201.20.201.226;
   posting-account=QvXz7Q0AAABpEoGXcn0fFVJYSsupcqGQ