httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Farber <alexander.far...@gmail.com>
Subject Re: How to access client socket from a protocol handler
Date Sat, 23 Oct 2010 16:24:12 GMT
Hello Ben,

On Sat, Oct 23, 2010 at 2:08 PM, Ben Noordhuis <info@bnoordhuis.nl> wrote:
> On Sat, Oct 23, 2010 at 10:13, Alexander Farber
> <alexander.farber@gmail.com> wrote:
> Your connection handler should return DECLINED for vhosts it doesn't
> handle (I wager mod_perl did this for you).
>
> You can get the vhost with conn->base_server and your module's
> per-server config with
> ap_get_module_config(conn->base_server->module_config, &your_module).
>

sorry, but I don't understand -

1) your original suggestion was to use

        apr_socket_t *socket = ap_get_module_config(conn->conn_config,
&core_module);

but I don't understand why it returns a socket instead of a config struct?

2) And now you suggest to
ap_get_module_config(conn->base_server->module_config, &your_module);
Yes, I know that it will return a custom config struct for my module,
which I can prepare/merge in the earlier handlers,
but how does it help me to access the client socket
for my VirtualHost at port 843

3) And finally you tell me to return DECLINED for vhosts my module
doesn't handle, but how can I recognize them in my protocol handler?

Regards
Alex

Mime
View raw message