1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #ifndef example_diameter_launcher_MyCommunicator_hpp
10 #define example_diameter_launcher_MyCommunicator_hpp
13 #include <anna/core/core.hpp>
14 #include <anna/comm/comm.hpp>
15 #include <anna/diameter/codec/Message.hpp>
18 #include <MyHandler.hpp>
21 class MyCommunicator : public anna::comm::Communicator {
23 MyCommunicator(const anna::comm::Communicator::WorkMode::_v acceptMode = anna::comm::Communicator::WorkMode::Single) : anna::comm::Communicator(acceptMode),
24 a_contexts("Contexts")
27 void prepareAnswer(anna::diameter::codec::Message *answer, const anna::DataBlock &request) const throw();
28 void terminate() throw();
31 using anna::comm::Communicator::eventBreakConnection;
33 anna::ThreadData <MyHandler> a_contexts;
34 void eventReceiveMessage(anna::comm::ClientSocket&, const anna::comm::Message&) throw(anna::RuntimeException);
35 void eventBreakConnection(Server* server) throw();