🚀 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 Arvid Haugen Tue, 19 Feb 2008 08:36
Keep-Alive/CloseConnection.
#454
Author: Arvid Haugen
Date: Tue, 19 Feb 2008 08:36
27 lines
2012 bytes
Hi,

I have set "Keep-Alive" in the TidHTTPServer. This keeps the sockets open.

Is there any timeout for this connection, or a max number of requestes that 
will be served for each connection?

Or do I need to program this myself?

The reason why I am asking is that Apache implements this and I would like 
to implement the same behavior. For Apache documentation:
KeepAlive
Syntax: KeepAlive max-requests
Default: KeepAlive 5

This directive enables Keep-Alive support. Set max-requests to the maximum 
number of requests you want Apache to entertain per connection. A limit is 
imposed to prevent a client from hogging your server resources. Set this to 
0 to disable support.

KeepAliveTimeout
Syntax: KeepAliveTimeout seconds
Default: KeepAliveTimeout 15

The number of seconds Apache will wait for a subsequent request before 
closing the connection. Once a request has been received, the timeout value 
specified by the Timeout directive applies.
Re: Keep-Alive/CloseConnection.
#457
Author: Arvid Haugen
Date: Tue, 19 Feb 2008 13:59
36 lines
2289 bytes
I will re-post this in the delphi forum as well - where it should be posted 
in the first place.

Sorry about that.

"Arvid Haugen" <Arvid@elis.no> skrev i melding 
news:47ba951c$1@newsgroups.borland.com...
> Hi,
>
> I have set "Keep-Alive" in the TidHTTPServer. This keeps the sockets open.
>
> Is there any timeout for this connection, or a max number of requestes 
> that will be served for each connection?
>
> Or do I need to program this myself?
>
> The reason why I am asking is that Apache implements this and I would like 
> to implement the same behavior. For Apache documentation:
> KeepAlive
> Syntax: KeepAlive max-requests
> Default: KeepAlive 5
>
> This directive enables Keep-Alive support. Set max-requests to the maximum 
> number of requests you want Apache to entertain per connection. A limit is 
> imposed to prevent a client from hogging your server resources. Set this 
> to 0 to disable support.
>
> KeepAliveTimeout
> Syntax: KeepAliveTimeout seconds
> Default: KeepAliveTimeout 15
>
> The number of seconds Apache will wait for a subsequent request before 
> closing the connection. Once a request has been received, the timeout 
> value specified by the Timeout directive applies.
>
> 
Re: Keep-Alive/CloseConnection.
#458
Author: Remy Lebeau (TeamB)
Date: Tue, 19 Feb 2008 17:26
31 lines
2029 bytes
"Arvid Haugen" <Arvid@elis.no> wrote in message 
news:47ba951c$1@newsgroups.borland.com...

> Is there any timeout for this connection

There are two timeouts that are available which you can use to manually 
mimic the functionality you are asking for (there is no timeout specific for 
it):

1) the connection's ReadTimeout property.  If the client does not send a new 
request during the specified interval, the connection will timeout and 
disconnect.  But it will also timeout if the connection is slower than the 
interval as well.

2) the server's SessionTimeOut property.  If the client does not send a new 
request using an existing session during the specified interval, the session 
will timeout.  You can use the OnCreateSession event to associate a 
connection with a session, and then use the OnSessionEnd event to disconnect 
the connection.

> or a max number of requestes that will be served for each connection?

No.

> Or do I need to program this myself?

Yes.


Gambit 
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