X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2FrxSimpleTest%2FMyCommunicator.hpp;fp=example%2Fdiameter%2FrxSimpleTest%2FMyCommunicator.hpp;h=0d2efe5b3e490600391e2bc8cc096a85dd12d22b;hb=26ae04c7e1eba19d02823bcc87c0ee9f6ce76186;hp=0000000000000000000000000000000000000000;hpb=398d53cb90e9f25dc89a46396225eef981f0ab24;p=anna.git diff --git a/example/diameter/rxSimpleTest/MyCommunicator.hpp b/example/diameter/rxSimpleTest/MyCommunicator.hpp new file mode 100755 index 0000000..0d2efe5 --- /dev/null +++ b/example/diameter/rxSimpleTest/MyCommunicator.hpp @@ -0,0 +1,33 @@ +// ANNA - Anna is Not Nothingness Anymore // +// // +// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo // +// // +// See project site at http://redmine.teslayout.com/projects/anna-suite // +// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE // + + +#ifndef example_diameter_launcher_MyCommunicator_hpp +#define example_diameter_launcher_MyCommunicator_hpp + +// Project +#include +#include +#include + + +class MyCommunicator : public anna::comm::Communicator { +public: + MyCommunicator(const anna::comm::Communicator::WorkMode::_v acceptMode = anna::comm::Communicator::WorkMode::Single) : anna::comm::Communicator(acceptMode) + {;} + + void prepareAnswer(anna::diameter::codec::Message *answer, const anna::DataBlock &request) const throw(); + void terminate() throw(); + +private: + using anna::comm::Communicator::eventBreakConnection; + + void eventReceiveMessage(anna::comm::ClientSocket&, const anna::comm::Message&) throw(anna::RuntimeException); + void eventBreakConnection(Server* server) throw(); +}; + +#endif