Remove dynamic exceptions
[anna.git] / source / diameter.comm / ClientSessionReceiver.cpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
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 //
7
8
9 #include <anna/core/tracing/Logger.hpp>
10 #include <anna/core/tracing/TraceMethod.hpp>
11 #include <anna/core/DataBlock.hpp>
12 #include <anna/comm/Message.hpp>
13 #include <anna/comm/Server.hpp>
14
15 #include <anna/diameter.comm/ClientSessionReceiver.hpp>
16 #include <anna/diameter.comm/ClientSession.hpp>
17 #include <anna/diameter.comm/Server.hpp>
18 #include <anna/core/functions.hpp>
19
20 // STL
21 #include <string>
22
23
24 using namespace anna::diameter::comm;
25
26 void ClientSessionReceiver::apply(anna::comm::ClientSocket& clientSocket, const anna::comm::Message& message)
27 noexcept(false) {
28   LOGMETHOD(anna::TraceMethod tm("diameter.comm.ClientSessionReceiver", "apply", ANNA_FILE_LOCATION));
29   a_session->receive(message);
30 }
31
32 void ClientSessionReceiver::eventBreakConnection(const anna::comm::ClientSocket& clientSocket)
33 {
34   LOGMETHOD(anna::TraceMethod tm("diameter.comm.ClientSessionReceiver", "eventBreakConnection", ANNA_FILE_LOCATION));
35   a_session->finalize();
36 }
37
38 void ClientSessionReceiver::eventCreateConnection(const anna::comm::Server* server)
39 {
40   LOGMETHOD(anna::TraceMethod tm("diameter.comm.ClientSessionReceiver", "eventCreateConnection", ANNA_FILE_LOCATION));
41   a_session->recover();
42 }
43