diff options
Diffstat (limited to 'src/lbdata.hh')
| -rw-r--r-- | src/lbdata.hh | 47 |
1 files changed, 9 insertions, 38 deletions
diff --git a/src/lbdata.hh b/src/lbdata.hh index 6673604..287ca35 100644 --- a/src/lbdata.hh +++ b/src/lbdata.hh @@ -17,6 +17,7 @@ using namespace std; class LBHealth; +class LBTest; /** * @@ -77,7 +78,11 @@ public: LBHealthHistory(int buffer_size); //push in the ping response for this... - int push(int rtt); + int + push(int rtt); + + int + get_last_resp(); public: //results of health testing @@ -95,43 +100,6 @@ public: * * **/ -class LBTest { -public: - typedef enum {K_NONE,K_SUCCESS,K_FAILURE} TestState; -public: - LBTest(bool debug) : - _debug(debug), - _state(K_NONE) - {} - virtual ~LBTest(); - - virtual void - init(); - - virtual void - send(LBHealth &health) = 0; - - virtual int - recv(LBHealth &health) = 0; - - virtual string - dump() = 0; - -public: - bool _debug; - string _target; - int _resp_time; - int _state; - static int _recv_icmp_sock; - static int _send_raw_sock; - static int _send_icmp_sock; - static bool _initialized; -}; - -/** - * - * - **/ class LBHealth { public: typedef map<int,LBTest*> TestColl; @@ -185,6 +153,9 @@ public: start_new_test_cycle(); void + start_new_test(); + + void send_test(); int |
