diff options
author | Alan Conway <aconway@apache.org> | 2008-10-10 04:49:48 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-10-10 04:49:48 +0000 |
commit | 5d07d177cfc5eca21c44981bbe342f0cdcced4e5 (patch) | |
tree | 0f5f83642ed5effed52a5e2547565362ce2aea8c /cpp/src/qpid/client/ConnectionHandler.cpp | |
parent | e7ceead683231ef2cb35a6ee70488e859f023d12 (diff) | |
download | qpid-python-5d07d177cfc5eca21c44981bbe342f0cdcced4e5.tar.gz |
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
Diffstat (limited to 'cpp/src/qpid/client/ConnectionHandler.cpp')
-rw-r--r-- | cpp/src/qpid/client/ConnectionHandler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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<std::string>())); setState(OPEN); } + void ConnectionHandler::redirect(const std::string& /*host*/, const Array& /*knownHosts*/) { throw NotImplementedException("Redirection received from broker; not yet implemented in client"); |