Net::Peep::Client


NAME

Net::Peep::Client - Perl extension for client application module subclasses for Peep: The Network Auralizer.


SYNOPSIS

See the Net::Peep documentation for information about the usage of the Net::Peep::Client object.


DESCRIPTION

Provides support methods for the various Peep clients applications, can be subclassed to create new client modules, and eases the creation of generic Peep clients.

See the main Peep client documentation or

  perldoc Net::Peep

for more information on usage of this module.


OPTIONS

The following options are common to all Peep clients:

  --config=[PATH]       Path to the configuration file to use.
  --theme=[THEME]       Name of the theme to use.
  --debug=[NUMBER]      Enable debugging. (Def:  0)
  --nodaemon            Do not run in daemon mode.  (Def:  daemon)
  --pidfile=[PATH]      The file to write the pid out to.  (Daemon only.)
  --output=[PATH]       The file to log output to. (Def: stderr)
  --noautodiscovery     Disables autodiscovery and enables the server and port options.
                        (Default:  autodiscovery)
  --server=[HOST]       The host (or IP address) to connect to.  
  --port=[PORT NO]      The port to use.
  --protocol=[tcp|udp]  The protocol that will be used for client-server communication. 
                        (Def: tcp)
  --help                Prints this documentation.


EXPORT

None by default.


METHODS

    new() - The constructor
    name($name) - Sets/gets the name of the client.  All clients must
    have a name.
    initialize(%options) - Sets the value (using the setOption method
    of the Net::Peep::Conf object) of all command-line options parsed
    by Getopt::Long for the client.  Additional options may be
    specified using %options.  For more information on the format of
    the %options hash, see Getopt::Long.
    configure() - Returns a configuration object.  To be called after
    a call to initialize().
    parser($coderef) - Specifies a callback, which must be in the form
    of a code reference, to be used to parse the config ... end config
    block of the Peep configuration file for the client.
    callback($coderef) - Specifies a callback, which must be in the
    form of a code reference, to be used in the MainLoop method.
    MainLoop($sleep) - Starts the main loop.  If $sleep returns false,
    the callback is only called once; otherwise, the main loop sleeps
    $sleep seconds between each call to the callback.
    logger() - Returns a Net::Peep::Log object
    getConfigSection($section,@lines) - Retrieves a section by the
    name of $section from the lines of text @lines.  This is a utility
    method to assist with parsing sections from the Peep configuration
    file client config sections (e.g., the events section from the
    logparser definition in peep.conf).
    tempParseDefaults(@lines) - Parses a defaults section in a client
    config block in the Peep configuration file.  Note that this code
    duplicates the parseClientDefault method in Net::Peep::Parser.  It
    will be deprecated after backwards-compatibility of peep.conf is
    dropped, probably with the release of 0.5.0.
    getGroups() - Parses the 'groups' option and returns an array of groups.
    getExcluded() - Parses the 'excluded' option and returns a list of
    excluded groups.


AUTHOR

Michael Gilfix <mgilfix@eecs.tufts.edu> Copyright (C) 2000

Collin Starkweather <collin.starkweather@colorado.edu>


SEE ALSO

perl(1), peepd(1), Net::Peep::Client::Logparser, Net::Peep::Client::Sysmonitor, Net::Peep::BC, Net::Peep::Log.

http://peep.sourceforge.net


TERMS AND CONDITIONS

You should have received a file COPYING containing license terms along with this program; if not, write to Michael Gilfix (mgilfix@eecs.tufts.edu) for a copy.

This version of Peep is open source; you can redistribute it and/or modify it under the terms listed in the file COPYING.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 Net::Peep::Client