httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Trawick" <traw...@gmail.com>
Subject Re: process the request
Date Tue, 09 Jan 2007 18:32:43 GMT
On 1/9/07, 张 臻博 <laronfin@hotmail.com> wrote:
> hello
>
> 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?

macros

The chase begins with http_connection.h:

/**
 * This hook gives protocol modules an opportunity to set everything up
 * 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 module
 *            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 been
 * established, the protocol module must read and serve the request.  This
 * function does that for each protocol module.  The first protocol module
 * 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 connection
hook, see how the "process_connection" string is used in Apache in a
few macro invocations.
Mime
View raw message