X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/5924017d951d69132f2b8522dfa04927abc417d0..3fc5aa9ace37067af19ee3c1a1a0da2473cd9455:/stglibs/pinger.lib/pinger.h diff --git a/stglibs/pinger.lib/pinger.h b/stglibs/pinger.lib/pinger.h index 1398332d..f1f442e1 100644 --- a/stglibs/pinger.lib/pinger.h +++ b/stglibs/pinger.lib/pinger.h @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -30,8 +29,6 @@ #include "os_int.h" -using namespace std; - //----------------------------------------------------------------------------- struct ICMP_HDR { @@ -95,12 +92,11 @@ public: void AddIP(uint32_t ip); void DelIP(uint32_t ip); int GetPingIPNum() const; - //void GetAllIP(vector * ipTime) const; void PrintAllIP(); int GetIPTime(uint32_t ip, time_t * t) const; - void SetDelayTime(time_t delay); - time_t GetDelayTime() const; - string GetStrError() const; + void SetDelayTime(time_t d) { delay = d; } + time_t GetDelayTime() const { return delay; } + const std::string & GetStrError() const { return errorStr; } private: uint16_t PingCheckSum(void * data, int len); @@ -124,11 +120,11 @@ private: PING_MESSAGE pmSend; uint32_t pid; - string errorStr; + std::string errorStr; - multimap pingIP; - list ipToAdd; - list ipToDel; + std::multimap pingIP; + std::list ipToAdd; + std::list ipToDel; mutable pthread_mutex_t mutex; };