httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 张 臻博 <>
Subject Re: process the request
Date Tue, 09 Jan 2007 19:37:06 GMT

Thanks all for your valuable answer. I think now i am clear. Acturally, I 
am now trying to write some new code for Apache. It makes Apache be 
possible to be used in another protocol layer...

Thanks a lot.

>From: "Jeff Trawick" <>
>Subject: Re: process the request
>Date: Tue, 9 Jan 2007 13:32:43 -0500
>On 1/9/07, 张 臻博 <> wrote:
>>I am reading the code of apache. Is there anybody who knows whether
>>ap_run_pre_connection() and ap_run_process_connection() are 
>>functions or
>>macro? and where is the definition for those two , as i can not 
>>find any
>>detailed code for them?
>The chase begins with http_connection.h:
>* This hook gives protocol modules an opportunity to set everything 
>* before calling the protocol handler.  All pre-connection hooks are
>* run until one returns something other than ok or decline
>* @param c The connection on which the request has been received.
>* @param csd The mechanism on which this connection is to be read.
>*            Most times this will be a socket, but it is up to the 
>*            that accepts the request to determine the exact type.
>* @return OK or DECLINED
>AP_DECLARE_HOOK(int,pre_connection,(conn_rec *c, void *csd))
>* This hook implements different protocols.  After a connection has 
>* established, the protocol module must read and serve the request.  
>* function does that for each protocol module.  The first protocol 
>* to handle the request is the last module run.
>* @param c The connection on which the request has been received.
>* @return OK or DECLINED
>AP_DECLARE_HOOK(int,process_connection,(conn_rec *c))
>What do you want to find out?  The actual implementation isn't so
>interesting.  If you want to see how to implement your own 
>hook, see how the "process_connection" string is used in Apache in a
>few macro invocations.

与世界各地的朋友进行交流,免费下载  Live Messenger; 

View raw message