From 5d07d177cfc5eca21c44981bbe342f0cdcced4e5 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 10 Oct 2008 04:49:48 +0000 Subject: QPID-1340 froM Mick Goulish: preliminary client-side failover support. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703319 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/ConnectionHandler.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp') diff --git a/cpp/src/qpid/client/ConnectionHandler.cpp b/cpp/src/qpid/client/ConnectionHandler.cpp index 7f1cd5ce7f..b2245077e2 100644 --- a/cpp/src/qpid/client/ConnectionHandler.cpp +++ b/cpp/src/qpid/client/ConnectionHandler.cpp @@ -157,13 +157,17 @@ void ConnectionHandler::tune(uint16_t maxChannelsProposed, uint16_t maxFrameSize proxy.open(virtualhost, capabilities, insist); } -void ConnectionHandler::openOk(const framing::Array& /*knownHosts*/) +void ConnectionHandler::openOk ( const framing::Array& knownBrokers ) { checkState(OPENING, INVALID_STATE_OPEN_OK); - //TODO: store knownHosts for reconnection etc + knownBrokersUrls.clear(); + framing::Array::ValueVector::const_iterator i; + for ( i = knownBrokers.begin(); i != knownBrokers.end(); ++i ) + knownBrokersUrls.push_back(Url((*i)->get())); setState(OPEN); } + void ConnectionHandler::redirect(const std::string& /*host*/, const Array& /*knownHosts*/) { throw NotImplementedException("Redirection received from broker; not yet implemented in client"); -- cgit v1.2.1