We'd enjoy having a far more fine-grained control around the connections we serve inside a C++ Apache 2.2 module (on CentOS 5).

Among the connections must stay alive for any couple of multiple demands, therefore we set "KeepAlive" to "On" and hang a brief keep-alive period.

However for every such connection there exists a couple of more connections in the browser which we don't have to bid farewell to and rather wish to pressure these to close following a single request.

A few of these connections take presctiption different ports (therefore we can distinguish them by port, since KeepAlive could be set per virtual host) plus some request another URL (therefore we will easily notice in the path and parameters that people don't wish to leave them behind).

Moreover the main one we do wish to keep alive, we all know that whenever a particular request we want to shut it too.

But to date the only method we found to "cancel" the keep-alive would be to send a polite "Connection: close" header towards the client. When the client isn't well socialized, or malicious, they will keep it open and waste our assets.

It is possible to method to tell Apache to shut the bond in the server side? The documentation recommends against simply close(2) ask the socket since Apache must perform some cleanup before that's done. But can there be some API or perhaps a trick to "override" the static "KeepAlive On" configuration dynamically (and convince Apache to call close(2))?

Thanks.