Re: Net::Server - how to hook post_accept
- From: Andy Hassall <andy@xxxxxxxxxxx>
- Date: Sun, 20 Aug 2006 23:59:04 +0100
On 20 Aug 2006 15:42:06 -0700, "shutterstock" <jon@xxxxxxxxxxxxxxxx> wrote:
Define a sub post_accept_hook, rather than overriding post_accept in your
subclass.
http://search.cpan.org/~rhandom/Net-Server-0.94/lib/Net/Server.pm
"
$self->post_accept_hook()
For some reason - if i define post_accept_hook - it never gets called!
i just tried it again - and i can't seem to get that thing called.
How come the docs define
sub process_request {
}
and not process_request_hook?
there seems to be an inconsistency?
sub process_request { } works great - and its the same type of hook!
They're not really the same type of hook. The *_hook subs are for doing
additional stuff after the server personality has handled that part of the
request cycle.
process_request is where you plug in your user code to do something useful
once the server has handled all the network stuff - so there isn't a
process_request_hook.
There does seem to be a call to $self->post_accept_hook in
run_client_connection in Net::Server, although I remember seeing a problem in
at least one version of Net::Server where one of the documented hook subs
wasn't called.
--
Andy Hassall :: andy@xxxxxxxxxxx :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
.
- Follow-Ups:
- Re: Net::Server - how to hook post_accept
- From: shutterstock
- Re: Net::Server - how to hook post_accept
- References:
- Net::Server - how to hook post_accept
- From: shutterstock
- Re: Net::Server - how to hook post_accept
- From: Andy Hassall
- Re: Net::Server - how to hook post_accept
- From: shutterstock
- Net::Server - how to hook post_accept
- Prev by Date: Re: Net::Server - how to hook post_accept
- Next by Date: Peer-reviewed CPAN modules files wanted
- Previous by thread: Re: Net::Server - how to hook post_accept
- Next by thread: Re: Net::Server - how to hook post_accept
- Index(es):
Relevant Pages
|
|