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 | d74b97b6f09be7dc26d48f5be765c06f13a7b606 (patch) | |
tree | 7429ea093c501a0cea813e088a3f12397989a393 /qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp | |
parent | 6717d8c90babee06ba092c521e555d07a3b94278 (diff) | |
download | qpid-python-d74b97b6f09be7dc26d48f5be765c06f13a7b606.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@638590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp')
-rw-r--r-- | qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp b/qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp index c0f0d9f5e0..0052b0d588 100644 --- a/qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp +++ b/qpid/cpp/src/qpid/broker/PreviewConnectionHandler.cpp @@ -37,14 +37,6 @@ const std::string PLAIN = "PLAIN"; const std::string en_US = "en_US"; } -void PreviewConnectionHandler::init(const framing::ProtocolInitiation& header) { - FieldTable properties; - string mechanisms(PLAIN); - string locales(en_US); - handler->serverMode = true; - handler->client.start(header.getMajor(), header.getMinor(), properties, mechanisms, locales); -} - void PreviewConnectionHandler::close(ReplyCode code, const string& text, ClassId classId, MethodId methodId) { handler->client.close(code, text, classId, methodId); @@ -68,7 +60,13 @@ void PreviewConnectionHandler::handle(framing::AMQFrame& frame) } } -PreviewConnectionHandler::PreviewConnectionHandler(PreviewConnection& connection) : handler(new Handler(connection)) {} +PreviewConnectionHandler::PreviewConnectionHandler(PreviewConnection& connection) : handler(new Handler(connection)) { + FieldTable properties; + string mechanisms(PLAIN); + string locales(en_US); + handler->serverMode = true; + handler->client.start(0, 10, properties, mechanisms, locales); +} PreviewConnectionHandler::Handler:: Handler(PreviewConnection& c) : client(c.getOutput()), server(c.getOutput()), connection(c), serverMode(false) {} |