From 295f7079a68250ff01610de720427bef2039a4eb Mon Sep 17 00:00:00 2001 From: Andrew Stitcher Date: Fri, 9 Oct 2009 03:38:22 +0000 Subject: Used new SocketAddress class in rdma code git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@823392 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/RdmaConnector.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'cpp/src/qpid/client/RdmaConnector.cpp') diff --git a/cpp/src/qpid/client/RdmaConnector.cpp b/cpp/src/qpid/client/RdmaConnector.cpp index 0aefcc04cf..0692c3d85c 100644 --- a/cpp/src/qpid/client/RdmaConnector.cpp +++ b/cpp/src/qpid/client/RdmaConnector.cpp @@ -167,20 +167,9 @@ void RdmaConnector::connect(const std::string& host, int port){ assert(joined); poller = Poller::shared_ptr(new Poller); - // This stuff needs to abstracted out of here to a platform specific file - ::addrinfo *res; - ::addrinfo hints; - hints.ai_flags = 0; - hints.ai_family = AF_INET; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - int n = ::getaddrinfo(host.c_str(), boost::lexical_cast(port).c_str(), &hints, &res); - if (n<0) { - throw Exception(QPID_MSG("Cannot resolve " << host << ": " << ::gai_strerror(n))); - } - + SocketAddress sa(host, boost::lexical_cast(port)); Rdma::Connector* c = new Rdma::Connector( - *res->ai_addr, + sa, Rdma::ConnectionParams(maxFrameSize, Rdma::DEFAULT_WR_ENTRIES), boost::bind(&RdmaConnector::connected, this, poller, _1, _2), boost::bind(&RdmaConnector::connectionError, this, poller, _1, _2), -- cgit v1.2.1