🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TIdHTTPServer: question about KeepAlive

#1128
From: emerson.pardo
Date: Wed, 23 May 2007 12:10
55 lines
3140 bytes
Thanks for your prompt reply, Remy!

On 22 maio, 16:55, "Remy Lebeau \(TeamB\)" <no.s...@no.spam.com>
wrote:
> <emerson.pa...@gmail.com> wrote in message
>
> news:1179780948.075616.164470@x35g2000prf.googlegroups.com...
>
> > If I set TIdHTTPServer KeepAlive property to true the server
> > will try to keep all conections keep-alived?
>
> Only for those connections where the client actually asked for the
> connection to stay alive after the response has been sent.  Otherwise
> no.

Thanks, I was thinking it was this way.

> > What does happen if one client send some requests with
> > keep-alive enabled and others requests with keep-alive disabled?
>
> Each request is handled independantly.  If a keep-alive is not used on
> one request, then that connection will be disconnected after the
> response is sent.  The client would then have to reconnect to send the
> next request.

Fine, I understand it correct so.

> > My server is a stock quotes server and my client needs to start
> listen
> > some stock quotes so it sends one request (with keep-alive disabled)
> > for each stock it wants to listen.
>
> Then the client is going to have to reconnect on each new request.

Yes, the client is sending a new request for each stock it wants to
listen.

> > When my client begins it opens one connection with keep-alive
> enabled
> > and when the stocks updates his data the new values will be sent
> through
> > this connection. Now what is happening is that the server doesn't
> keep
> > this connection opened and I'm not understanding what is happening.
>
> Then the client is likely not requesting a keep-alive in its request
> to begin with, so the server's KeepAlive option is ignored for that
> connection.

Maybe it is here where is the bug in my system. I'm going to look at
this.

Thanks a lot Remy!

Emerson
Technical Details
Message-ID: <1179922225.310583.134290@w5g2000hsg.googlegroups.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!w5g2000hsg.googlegroups.com!not-for-mail
References: <1179780948.075616.164470@x35g2000prf.googlegroups.com> <46534b0b@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,c40d4766d883446f
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!postnews.google.com!w5g2000hsg.googlegroups.com!not-for-mail
From: emerson.pardo@gmail.com
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: TIdHTTPServer: question about KeepAlive
Date: 23 May 2007 05:10:25 -0700
Organization: http://groups.google.com
Lines: 56
Message-ID: <1179922225.310583.134290@w5g2000hsg.googlegroups.com>
References: <1179780948.075616.164470@x35g2000prf.googlegroups.com>
   <46534b0b@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 1179922235 421 127.0.0.1 (23 May 2007 12:10:35 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 23 May 2007 12:10:35 +0000 (UTC)
In-Reply-To: <46534b0b@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: w5g2000hsg.googlegroups.com; posting-host=201.20.201.226;
   posting-account=QvXz7Q0AAABpEoGXcn0fFVJYSsupcqGQ