diff options
author | Alan Conway <aconway@apache.org> | 2008-03-18 21:31:08 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-03-18 21:31:08 +0000 |
commit | 36e23bcefbf0a6893370cb041bd05a662f0b2758 (patch) | |
tree | 601d29d88e873ac4d58da3cdb2753f02b64998bc /cpp/src/qpid/broker/ConnectionHandler.cpp | |
parent | eac0911169b24e708637572fe6b5a8283b3f49e0 (diff) | |
download | qpid-python-36e23bcefbf0a6893370cb041bd05a662f0b2758.tar.gz |
Make AsyncIOAcceptor multi-protocol:
- ConnectionCodec interface replaces ConnectionInputHandle, moves encoding/decoding out of AsyncIOAcceptor.
- ConnectionCodec::Factory replaces ConnectionInputHandlerFactory
- Acceptor creates version-specific ConnectionCodec based on protocol header.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@638590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/ConnectionHandler.cpp')
-rw-r--r-- | cpp/src/qpid/broker/ConnectionHandler.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp index 0aee420022..53a403c955 100644 --- a/cpp/src/qpid/broker/ConnectionHandler.cpp +++ b/cpp/src/qpid/broker/ConnectionHandler.cpp @@ -38,17 +38,6 @@ const std::string PLAIN = "PLAIN"; const std::string en_US = "en_US"; } -void ConnectionHandler::init(const framing::ProtocolInitiation& header) { - //need to send out a protocol header back to the client - handler->connection.getOutput().initiated(header); - - FieldTable properties; - string mechanisms(PLAIN); - string locales(en_US); - handler->serverMode = true; - handler->client.start(properties, mechanisms, locales); -} - void ConnectionHandler::close(ReplyCode code, const string& text, ClassId classId, MethodId methodId) { handler->client.close(code, text, classId, methodId); @@ -75,7 +64,15 @@ void ConnectionHandler::handle(framing::AMQFrame& frame) } } -ConnectionHandler::ConnectionHandler(Connection& connection) : handler(new Handler(connection)) {} +ConnectionHandler::ConnectionHandler(Connection& connection) : handler(new Handler(connection)) { + FieldTable properties; + string mechanisms(PLAIN); + string locales(en_US); + handler->serverMode = true; + handler->client.start(properties, mechanisms, locales); +} + + ConnectionHandler::Handler:: Handler(Connection& c) : client(c.getOutput()), server(c.getOutput()), connection(c), serverMode(false) {} |