Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 87594 invoked from network); 9 Jan 2007 19:37:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2007 19:37:40 -0000 Received: (qmail 11071 invoked by uid 500); 9 Jan 2007 19:37:40 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 11022 invoked by uid 500); 9 Jan 2007 19:37:40 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 11011 invoked by uid 99); 9 Jan 2007 19:37:40 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 11:37:40 -0800 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of laronfin@hotmail.com designates 65.54.246.90 as permitted sender) Received: from [65.54.246.90] (HELO bay0-omc1-s18.bay0.hotmail.com) (65.54.246.90) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 11:37:29 -0800 Received: from hotmail.com ([65.55.139.81]) by bay0-omc1-s18.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2668); Tue, 9 Jan 2007 11:37:09 -0800 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 9 Jan 2007 11:37:08 -0800 Message-ID: Received: from 65.55.139.123 by by134fd.bay134.hotmail.msn.com with HTTP; Tue, 09 Jan 2007 19:37:06 GMT X-Originating-IP: [130.233.20.75] X-Originating-Email: [laronfin@hotmail.com] X-Sender: laronfin@hotmail.com In-Reply-To: From: =?gb2312?B?1cUg1emyqQ==?= To: dev@httpd.apache.org Subject: Re: process the request Date: Tue, 09 Jan 2007 19:37:06 +0000 Mime-Version: 1.0 Content-Type: text/plain; charset=gb2312; format=flowed X-OriginalArrivalTime: 09 Jan 2007 19:37:08.0793 (UTC) FILETIME=[8D088A90:01C73425] X-Virus-Checked: Checked by ClamAV on apache.org Hello, 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. br frankie >From: "Jeff Trawick" >Reply-To: dev@httpd.apache.org >To: dev@httpd.apache.org >Subject: Re: process the request >Date: Tue, 9 Jan 2007 13:32:43 -0500 > >On 1/9/07, �� �鲩 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. _________________________________________________________________ ��������ص����ѽ��н������������ Live Messenger; http://get.live.com/messenger/overview