Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
hdicoreInternetPing.h
Go to the documentation of this file.
1
7#ifndef __HDI_CORE_INTERNET_PING__
8#define __HDI_CORE_INTERNET_PING__
9
10#include <string>
11
12namespace hdi
13{
14 namespace core
15 {
16 class Callback;
17
24 {
25 public:
39 const std::string& domain_,
40 const Callback& success_,
41 const Callback& failure_
42 );
43
64 const std::string& domain_,
65 const Callback& success_,
66 const Callback& failure_
67 );
68
74 virtual ~InternetPing();
75
83 virtual bool asynchronous() const;
84
90 virtual void run();
91
99 virtual bool running() const;
100
111 virtual bool reached() const;
112
124 virtual double timing() const;
125
138 virtual std::string address() const;
139
150 virtual std::string error() const;
151
152
153 private:
157 void* __impl;
158
164 InternetPing();
165
172
178 InternetPing& operator=(const InternetPing&);
179 };
180 }
181}
182
183#endif
184// __HDI_CORE_INTERNET_PING__
Base class for templated __Callback class.
Definition: hdicoreCallback.h:68
Allows for the creation of simple ICMP ping clients to check the availability of a remote host.
Definition: hdicoreInternetPing.h:24
virtual bool running() const
Gets whether the ping request is currently running.
virtual bool reached() const
Gets whether the remote host was reached when pinged.
InternetPing(const std::string &domain_, const Callback &success_, const Callback &failure_)
Creates a synchronous (blocking) InternetPing object to perform a ping request.
virtual bool asynchronous() const
Gets whether the target object is asynchronous (i.e. executes in a background thread)
virtual void run()
Starts the ping request.
virtual double timing() const
Gets how long it took to reach the remote host.
virtual std::string error() const
Gets an error description if the ping request failed.
virtual std::string address() const
Gets the IP address of the remote host for the domain given when the InternetPing object was construc...
virtual ~InternetPing()
Destructs an InternetPing object.
static InternetPing * Async(const std::string &domain_, const Callback &success_, const Callback &failure_)
Creates an asynchronous (non-blocking) InternetPing object to perform a ICMP ping request.