Fix symlinks
[anna.git] / source / diameter.comm / ServerSessionReceiver.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/ServerSessionReceiver.hpp>
16 #include <anna/diameter.comm/ServerSession.hpp>
17 #include <anna/diameter.comm/LocalServer.hpp>
18 #include <anna/core/functions.hpp>
19
20 // STL
21 #include <string>
22
23
24 using namespace anna::diameter::comm;
25
26 void ServerSessionReceiver::apply(anna::comm::ClientSocket& clientSocket, const anna::comm::Message& message)
27 throw(anna::RuntimeException) {
28   LOGMETHOD(anna::TraceMethod tm("diameter::comm::ServerSessionReceiver", "apply", ANNA_FILE_LOCATION));
29   a_session->receive(message);
30 }
31
32 void ServerSessionReceiver::eventBreakLocalConnection(const anna::comm::ClientSocket& clientSocket)
33 throw() {
34   LOGMETHOD(anna::TraceMethod tm("diameter::comm::ServerSessionReceiver", "eventBreakLocalConnection", ANNA_FILE_LOCATION));
35   //if (!a_session) return; // caso de los Engine::closeServerSession
36   a_session->finalize();
37   ///* (*) no need for: if (a_session->idle()) */a_session->getParent()->eraseServerSession(a_clientSocket);
38 }
39