summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/ConnectionImpl.cpp
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2011-05-26 20:38:16 +0000
committerAndrew Stitcher <astitcher@apache.org>2011-05-26 20:38:16 +0000
commit8b0fdd57753b16120a7d1b591f006614d647971b (patch)
treec179596065a5df4519fa78db71ea1f6bfcbf55cd /cpp/src/qpid/client/ConnectionImpl.cpp
parentd2c1a2e7b358471090867bfeda9d23db1898493d (diff)
downloadqpid-python-8b0fdd57753b16120a7d1b591f006614d647971b.tar.gz
Refactor socket connect calls to take a string port
This is used used to implement unix domain sockets - QPID-3281 git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1128064 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client/ConnectionImpl.cpp')
-rw-r--r--cpp/src/qpid/client/ConnectionImpl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp
index 40c004f166..577a9ecd98 100644
--- a/cpp/src/qpid/client/ConnectionImpl.cpp
+++ b/cpp/src/qpid/client/ConnectionImpl.cpp
@@ -36,6 +36,7 @@
#include <boost/bind.hpp>
#include <boost/format.hpp>
+#include <boost/lexical_cast.hpp>
#include <boost/shared_ptr.hpp>
#include <limits>
@@ -258,8 +259,9 @@ void ConnectionImpl::open()
connector->setInputHandler(&handler);
connector->setShutdownHandler(this);
try {
- connector->connect(host, port);
-
+ std::string p = boost::lexical_cast<std::string>(port);
+ connector->connect(host, p);
+
} catch (const std::exception& e) {
QPID_LOG(debug, "Failed to connect to " << protocol << ":" << host << ":" << port << " " << e.what());
connector.reset();
@@ -267,7 +269,7 @@ void ConnectionImpl::open()
}
connector->init();
QPID_LOG(info, *this << " connected to " << protocol << ":" << host << ":" << port);
-
+
// Enable heartbeat if requested
uint16_t heartbeat = static_cast<ConnectionSettings&>(handler).heartbeat;
if (heartbeat) {