🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages Started by emerson.pardo Mon, 21 May 2007 20:55
TIdHTTPServer: question about KeepAlive
#1125
Author: emerson.pardo
Date: Mon, 21 May 2007 20:55
19 lines
1902 bytes
Hi all,

If I set TIdHTTPServer KeepAlive property to true the server will try
to keep all conections keep-alived?

What does happen if one client send some requests with keep-alive
enabled and others requests with keep-alive disabled?

Let me explain what I'm trying to do. 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. 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. Any ideas?

Thanks in advance,
Emerson
Re: TIdHTTPServer: question about KeepAlive
#1126
Author: Remy Lebeau (TeamB)
Date: Tue, 22 May 2007 19:55
40 lines
2365 bytes
<emerson.pardo@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.

> 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.

> 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.

> 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.


Gambit
Re: TIdHTTPServer: question about KeepAlive
#1128
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads