httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Meyer <mwm-keyword-apache.b9a...@mired.org>
Subject Re: How to access client socket from a protocol handler
Date Fri, 22 Oct 2010 22:01:31 GMT
On Fri, 22 Oct 2010 23:54:17 +0200
Ben Noordhuis <info@bnoordhuis.nl> wrote:

> On Fri, Oct 22, 2010 at 23:08, Alexander Farber
> <alexander.farber@gmail.com> wrote:
> > Unfortunately there aren't many example for the protocol handlers
> > on the web or in Nick's book. I've come up with the following,
> > but don't know how to get the client socket via conn_rec?
> 
> apr_socket_t *client  = ap_get_module_config(conn->conn_config, &core_module);
> 
> But note that in most cases direct socket I/O is a bad idea.

I use that to get the socket so I can poll for it to have data in it,
and do other things while I'm waiting. Is there a better alternative
for that, or is this an exception?

    <mike
-- 
Mike Meyer <mwm@mired.org>		http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Mime
View raw message