summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/Connector.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-01-13 19:15:31 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-01-13 19:15:31 +0000
commit766c218055567f4e387aab4678d8d1c840916465 (patch)
treea8caf1fc75a6505124b3e6d4ed3b36de5894f50c /cpp/src/qpid/client/Connector.cpp
parent5fec8f487c510e2309b3bc939fea70078a11af97 (diff)
downloadqpid-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.cpp5
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;
}