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/Connector.cpp | |
| 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/Connector.cpp')
| -rw-r--r-- | cpp/src/qpid/client/Connector.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/qpid/client/Connector.cpp b/cpp/src/qpid/client/Connector.cpp index 5cdde723af..e6355601df 100644 --- a/cpp/src/qpid/client/Connector.cpp +++ b/cpp/src/qpid/client/Connector.cpp @@ -128,6 +128,7 @@ class TCPConnector : public Connector, public sys::Codec, private sys::Runnable void init(); void close(); void send(framing::AMQFrame& frame); + void abort(); void setInputHandler(framing::InputHandler* handler); void setShutdownHandler(sys::ShutdownHandler* handler); @@ -233,6 +234,10 @@ void TCPConnector::close() { closeInternal(); } +void TCPConnector::abort() { + aio->requestCallback(boost::bind(&TCPConnector::eof, this, _1)); +} + void TCPConnector::setInputHandler(InputHandler* handler){ input = handler; } |
