diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2009-01-13 19:15:31 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2009-01-13 19:15:31 +0000 |
| commit | 766c218055567f4e387aab4678d8d1c840916465 (patch) | |
| tree | a8caf1fc75a6505124b3e6d4ed3b36de5894f50c /cpp/src/qpid/client/ConnectionHandler.h | |
| parent | 5fec8f487c510e2309b3bc939fea70078a11af97 (diff) | |
| download | qpid-python-766c218055567f4e387aab4678d8d1c840916465.tar.gz | |
Implement heartbeat timeout on client:
- The client shuts down a connection if
it receives no traffic on it in 2 timeout periods
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@734221 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionHandler.h')
| -rw-r--r-- | cpp/src/qpid/client/ConnectionHandler.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/qpid/client/ConnectionHandler.h b/cpp/src/qpid/client/ConnectionHandler.h index 58b540cfeb..b3b15e2f04 100644 --- a/cpp/src/qpid/client/ConnectionHandler.h +++ b/cpp/src/qpid/client/ConnectionHandler.h @@ -35,6 +35,7 @@ #include "qpid/framing/FrameHandler.h" #include "qpid/framing/InputHandler.h" #include "qpid/sys/SecurityLayer.h" +#include "qpid/sys/Timer.h" #include "qpid/Url.h" #include <memory> @@ -69,6 +70,7 @@ class ConnectionHandler : private StateManager, framing::FieldTable properties; std::auto_ptr<Sasl> sasl; std::auto_ptr<qpid::sys::SecurityLayer> securityLayer; + boost::intrusive_ptr<qpid::sys::TimerTask> rcvTimeoutTask; void checkState(STATES s, const std::string& msg); @@ -109,7 +111,8 @@ public: bool isClosed() const; bool isClosing() const; - std::auto_ptr<qpid::sys::SecurityLayer> getSecurityLayer(); + std::auto_ptr<qpid::sys::SecurityLayer> getSecurityLayer(); + void setRcvTimeoutTask(boost::intrusive_ptr<qpid::sys::TimerTask>); CloseListener onClose; ErrorListener onError; |
