You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" <ma...@hp.com> on 2001/08/07 04:30:32 UTC

keepalive status

Quick Question : If keepalive is enabled, how is a module conveyed of a
dropped connection - OR in other words, what is a good point when a module
should clean up data after a connection has been dropped / aborted ?..

Thanks
-Madhu

Re: keepalive status

Posted by dean gaudet <dg...@arctic.org>.
in apache-1.3 you have two choices -- if you use hard timeouts then you
don't get any notification, the request is aborted and longjmp() takes the
child back to its main loop.  if you use soft timeouts then you eventually
can detect a closed connection by studying r->connection->aborted.
(there are examples in the core.)

in apache-2.0 you only have the second choice, except i'm not exactly sure
of the right syntax... you may have to study the result codes of the
various write operations.

in either case the kernel doesn't always know the client has gone away
immediately, and application notification can take some time.

in particular there's no easy way to determine the client is gone if
you're not writing anything to the client (i.e. you're waiting on a
database query or some expensive calculation, and have nothing to write to
the client).

-dean

On Mon, 6 Aug 2001, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:

> Quick Question : If keepalive is enabled, how is a module conveyed of a
> dropped connection - OR in other words, what is a good point when a module
> should clean up data after a connection has been dropped / aborted ?..
>
> Thanks
> -Madhu
>