add pre- and post-connection hooks to -async

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@896 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2008-05-10 05:53:39 +00:00
parent cbf652d96b
commit 104c8b1710

View File

@ -55,6 +55,7 @@ sub new {
$self->{mode} = 'connect';
$self->load_plugins;
$self->load_logging;
$self->run_hooks("pre-connection");
return $self;
}
@ -83,6 +84,7 @@ sub reset_for_next_message {
};
$self->{mode} = 'cmd';
$self->{_extras} = {};
warn "resetting...\n";
}
sub respond {
@ -147,6 +149,12 @@ sub disconnect {
$self->close;
}
sub close {
my Qpsmtpd::PollServer $self = shift;
$self->run_hooks("post-connection");
$self->SUPER::close;
}
sub start_conversation {
my Qpsmtpd::PollServer $self = shift;