Michael wrote:

ii) is there any way to perform a select(2) or like on the $socket? I
would like to implement some sort of 'timeout' in the read loop..say,
after 5 secs if nothing is recv'd from the client then the connection
will be closed. I have tried alarm/die pair but it was a failure. Any

idea?

You have the APR::Socket object, so it should be possible. Though I see
that apr_poll_ API is not glued.

!MODULE=APR::Poll
 apr_poll_socket_add
 apr_poll_socket_clear
 apr_poll_data_get
 apr_poll_revents_get
 apr_poll_socket_mask
 apr_poll
 apr_poll_socket_remove
 apr_poll_data_set
 apr_poll_setup

The ! mark in xs/maps/apr_functions.map disables the glueing of this API
subset at the build time.

sorry but I would like to ask how do I glue that?
I tried the util/xs_check.pl in the modperl2 src dir, and it reports..

 unable to glue 27 mapped functions:
[...]

it requires more than that, since the C types used by apr_pool functions aren't all having Perl typemap entries. Before we implement these let's ask Doug why he chose to skip APR::Poll in first place.

Finally, as I've mention before, I would like to put this non http thing
together with other http things on the same port 80. Is this possible? say,
when this handler sees GET|POST|HEAD it forgets the request and let the
Apache HTTP module process it in the normal way?
This is a job of the PerlPreConnectionHandler, which is currently not implemented. Its purpose is to look at the first request of the new connection and dynamically assign a protocol handler for the current connection.

__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com

Reply via email to