Logo Search packages:      
Sourcecode: poco version File versions  Download package

Ping Class Reference

Inheritance diagram for Ping:

Poco::Util::Application Poco::Util::Subsystem Poco::RefCountedObject

List of all members.


Detailed Description

This sample demonstrates the Poco::Net::ICMPClient in conjunction with Poco Foundation C#-like events functionality.

Try Ping --help (on Unix platforms) or Ping /help (elsewhere) for more information.

Definition at line 65 of file Ping.cpp.


Public Types

enum  ConfigPriority { PRIO_APPLICATION = -100, PRIO_DEFAULT = 0, PRIO_SYSTEM = 100 }
enum  ExitCode {
  EXIT_OK = 0, EXIT_USAGE = 64, EXIT_DATAERR = 65, EXIT_NOINPUT = 66,
  EXIT_NOUSER = 67, EXIT_NOHOST = 68, EXIT_UNAVAILABLE = 69, EXIT_SOFTWARE = 70,
  EXIT_OSERR = 71, EXIT_OSFILE = 72, EXIT_CANTCREAT = 73, EXIT_IOERR = 74,
  EXIT_TEMPFAIL = 75, EXIT_PROTOCOL = 76, EXIT_NOPERM = 77, EXIT_CONFIG = 78
}

Public Member Functions

void addSubsystem (Subsystem *pSubsystem)
 Creates the Application and calls init(argc, argv).
std::string commandName () const
LayeredConfiguration & config () const
 Returns the command name used to invoke the application.
void duplicate () const
template<class C>
C & getSubsystem () const
void init (const std::vector< std::string > &args)
void init (int argc, char *argv[])
bool initialized () const
void loadConfiguration (const std::string &path, int priority=PRIO_DEFAULT)
int loadConfiguration (int priority=PRIO_DEFAULT)
Poco::Loggerlogger () const
 Returns the application's configuration.
const char * name () const
const OptionSet & options () const
int referenceCount () const
void release () const
 Increments the object's reference count.
virtual int run ()
void setUnixOptions (bool flag)
const Poco::TimestampstartTime () const
void stopOptionsProcessing ()
 Returns the application uptime.
Poco::Timespan uptime () const
 Returns the application start time (UTC).

Static Public Member Functions

static Application & instance ()
 Returns the application's option set.

Protected Member Functions

void defineOptions (OptionSet &options)
void displayHelp ()
bool findFile (Poco::Path &path) const
void handleOption (const std::string &name, const std::string &value)
void init ()
void initialize (Application &self)
int main (const std::vector< std::string > &args)
 Sets the logger used by the application.
void onBegin (const void *pSender, ICMPEventArgs &args)
void onEnd (const void *pSender, ICMPEventArgs &args)
void onError (const void *pSender, ICMPEventArgs &args)
void onReply (const void *pSender, ICMPEventArgs &args)
void reinitialize (Application &self)
void setLogger (Poco::Logger &logger)
void uninitialize ()

Private Attributes

bool _helpRequested
ICMPClient _icmpClient
int _repetitions
std::string _target

Friends

class Application
 Destroys the Subsystem.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index