hello!
How can i include the source file that i made in the Apache server
comiplation process, while the module is still built as a DSO by
using apxs
You would have to declare the structure in a header file, which you
#include in both your module source code and in the Apache source
file where you reference it. Then, when you configure httpd, you can
tell it where your header file lives by passing an environment
variable, like:
CFLAGS="-I/path/to/your/module/source" ./configure ...
Thanks a lot to your kindly reply. The structure is declared in the header
file, however, it is initialized in the C source file(.c) in the module
part during the process of create_server_config. If i just include the
header file, will it work?
Please let me describe what i want to do in a bit more detail. Actually i
try to implement a different layer to handle http request&response. In the
module part, in the header file i will declare and in the c source file i
will initialize a socket structure that is different from the normal tcp
socket structure.(ap_listen_rec *ap_listeners). This new socket structure
will be used in the prefork.c & pollset.c during the polling procedure.
That is why i have to include the source file in the comiplation procedure.
What should be the best way to handle this situation?
After the polling process, if the tcp socket is selected, then the normal
procedure handling the http request will be
followed.(ap_run_create_connection,ap_process_connection). If another type
of socket that is implemented by me is selected then one module in my
module will be called. The data will be read from this socket and parsed to
the normal http request. Then I will try to call the
(ap_rn_pre_connection,ap_run_process_connection) hook again. Before sending
back the resources, i will try to patch them back to the data structure
that is suitable for my layer's communication and send it back. I am now
just in the step implementing the new polling procedure. Would you please
give me some comments that will be helpful for me to realize the goal(any
comments will be beneficial both in the polling process and the whole
feature)?
It is of course entirely up to you how you design your module and
its interaction with the core, and we cannot make any assumptions
about your particular requirements. However, you must realize that
modifying the httpd core ties your module completely to that
modified version of Apache: anyone who wants to use it must patch
and recompile httpd before they can do so, and repeat this step
each time they upgrade Apache.
I just wonder if i successfully realize this feature. Is it possible to
include the modification to the new release of Apache http server.
Any comments are greatly appreciated. Thanks a lot in advance!
br
frankie
_________________________________________________________________
与联机的朋友进行交流,请使用 Live Messenger;
http://get.live.com/messenger/overview