diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-24 01:49:07 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-24 01:49:07 +0000 |
commit | 5b08c0883c83c95ceca07e590620fe254b17f6ab (patch) | |
tree | 7ea4f795eb8a18530e231dc5ce2bac41027c3eb4 /include | |
parent | 0a1ef900f98881a03dfa0945ff1eddfa8b1dfba5 (diff) |
Added ping checks for server links (experimental)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1481 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/connection.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/connection.h b/include/connection.h index 8f5efe2d7..88dc3ea54 100644 --- a/include/connection.h +++ b/include/connection.h @@ -93,6 +93,14 @@ class ircd_connector : public Extensible */ std::string WriteError; + /** Time this connection was last pinged + */ + time_t nextping; + + /** Did this connection reply to its last ping? + */ + bool replied; + public: /** IRCD Buffer for input characters, holds as many lines as are @@ -236,6 +244,15 @@ class ircd_connector : public Extensible /** Returns true if there is data to be written that hasn't been sent yet */ bool HasBufferedOutput(); + + /** Checks if the connection replied to its last ping, and if it did + * sends another and returns true, if not, returns false. + */ + bool CheckPing(); + + /** Resets the ping counter + */ + void ResetPing(); }; |