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 08:09:13 GMT
Hello again, the

http://perl.apache.org/dist/mod_perl-2.0-current/xs/Apache2/Connection/Apache2__Connection.h

uses conn_config to get at the client socket as well, but
I've also noticed that they pass an additional argument there:

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

    if (s) {
        ap_set_module_config(c->conn_config, &core_module, s);
    }

Maybe this ensures, that the custom perl protocol handler gets
the correct socket (the one bound at the port 843 and not 80)?

In my C module, I probably get the wrong socket (the one at port 80)?
I probably need to somehow walk through all the servers and find my
VirtualHost which is listening at port 843?

I've put my both modules and the problem description here:
http://stackoverflow.com/questions/4002871/apache-module-in-c-how-to-write-data-to-client-socket

Thank you
Alex

Mime
View raw message