MAN page from Old RedHat 6.X libnet-1.0606-1.i386.rpm
Net::SNPP
Section: User Contributed Perl Documentation (3)
Updated: perl 5.005, patch 03
Index NAME
Net::SNPP - Simple Network Pager Protocol Client
SYNOPSIS
use Net::SNPP; # Constructors $snpp = Net::SNPP->new('snpphost'); $snpp = Net::SNPP->new('snpphost', Timeout => 60); NOTE
This module is not complete, yet !
DESCRIPTION
This module implements a client interface to the SNPP protocol, enablinga perl5 application to talk to SNPP servers. This documentation assumesthat you are familiar with the SNPP protocol described in RFC1861.
A new Net::SNPP object must be created with the new method. Oncethis has been done, all SNPP commands are accessed through this object.
EXAMPLES
This example will send a pager message in one hour saying ``Your lunch is ready''
#!/usr/bin/perl -w use Net::SNPP; $snpp = Net::SNPP->new('snpphost'); $snpp->send( Pager => $some_pager_number, Message => "Your lunch is ready", Alert => 1, Hold => time + 3600, # lunch ready in 1 hour :-) ) || die $snpp->message; $snpp->quit; CONSTRUCTOR
- new ( [ HOST, ] [ OPTIONS ] )
- This is the constructor for a new Net::SNPP object. HOST is thename of the remote host to which a SNPP connection is required.
If HOST is not given, then the SNPP_Host specified in Net::Configwill be used.
OPTIONS are passed in a hash like fashion, using key and value pairs.Possible options are:
Timeout - Maximum time, in seconds, to wait for a response from theSNPP server (default: 120)
Debug - Enable debugging information
Example:
$snpp = Net::SNPP->new('snpphost', Debug => 1, );
METHODS
Unless otherwise stated all methods return either a
true or
falsevalue, with
true meaning that the operation was a success. When a methodstates that it returns a value, failure will be returned as
undef or anempty list.
- reset ()
- help ()
- Request help text from the server. Returns the text or undef upon failure
- quit ()
- Send the QUIT command to the remote SNPP server and close the socket connection.
EXPORTS
Net::SNPP exports all that
Net::CMD exports, plus three more subroutinesthat can bu used to compare against the result of
status. These are :-
CMD_2WAYERROR,
CMD_2WAYOK, and
CMD_2WAYQUEUED.
SEE ALSO
the
Net::Cmd manpageRFC1861
AUTHOR
Graham Barr <gbarrAATTpobox.com>
COPYRIGHT
Copyright (c) 1995-1997 Graham Barr. All rights reserved.This program is free software; you can redistribute it and/or modifyit under the same terms as Perl itself.
Index
- NAME
- SYNOPSIS
- NOTE
- DESCRIPTION
- EXAMPLES
- CONSTRUCTOR
- METHODS
- EXPORTS
- SEE ALSO
- AUTHOR
- COPYRIGHT
This document was created byman2html,using the manual pages.