ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/AnyEvent-Porttracker/Porttracker.pm
(Generate patch)

Comparing cvsroot/AnyEvent-Porttracker/Porttracker.pm (file contents):
Revision 1.7 by root, Tue Nov 16 01:16:58 2010 UTC vs.
Revision 1.8 by root, Tue Nov 16 01:22:03 2010 UTC

379 379
380 $msg =~ s/\n$//; 380 $msg =~ s/\n$//;
381 $self->error ("login failed: $msg"); 381 $self->error ("login failed: $msg");
382} 382}
383 383
384sub on_event_notify {
385 my ($self, $event, @args) = @_;
386
387 call $self, "on_${event}_event", @args;
388}
389
384=back 390=back
385 391
386=head2 EVENTS 392=head2 EVENTS
387 393
388AnyEvent::Porttracker conenctions are fully event-driven, and naturally 394AnyEvent::Porttracker conenctions are fully event-driven, and naturally
460 466
461Called when the server wants to start TLS negotiation. This is used 467Called when the server wants to start TLS negotiation. This is used
462internally and - while it is possible to override it - should not be 468internally and - while it is possible to override it - should not be
463overriden. 469overriden.
464 470
471=item on_event_notify $api, $eventname, @args
472
473Called when the server broadcasts an event the API object is subscribed
474to. The default implementation (which should not be overridden) simply
475re-issues an "on_evenname_event" event with the @args.
476
465=item on_XYZ_notify $api, ... 477=item on_XYZ_notify $api, ...
466 478
467In general, any protocol notification will result in an event of the form 479In general, any protocol notification will result in an event of the form
468C<on_NOTIFICATION_notify>. 480C<on_NOTIFICATION_notify>.
469 481
482=item on_XYZ_event $api, ...
483
484Called when the server broadcasts the named (XYZ) event.
485
470=back 486=back
471 487
472=head1 SEE ALSO 488=head1 SEE ALSO
473 489
474L<AnyEvent>, L<http://www.porttracker.com/>, L<http://www.infoblox.com/en/products/portiq.html>. 490L<AnyEvent>, L<http://www.porttracker.com/>, L<http://www.infoblox.com/en/products/portiq.html>.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines