#include <stdlib.h> // rand()
#include <time.h>
-// XXXXXXXXXX
-#include <iostream>
-
-
-
using namespace std;
using namespace anna::diameter;
void ClientSession::setState(State::_v state) throw() {
Session::setState(state);
// Inform father server (availability changes):
- bool changes = a_parent->refreshAvailability();
+ a_parent->refreshAvailability();
}
void ClientSession::bind() throw(anna::RuntimeException) {
}
void ClientSession::eventRequestRetransmission(Message *request) throw() {
+
+ // OAM
+ OamModule &oamModule = OamModule::instantiate();
+ oamModule.count(OamModule::Counter::RequestRetransmitted);
+ oamModule.count(OamModule::Counter::RequestRetransmittedOnClientSession);
+
// Inform father server:
a_parent->eventRequestRetransmission(this, request);
}
}
}
);
+
// Main counters:
OamModule &oamModule = OamModule::instantiate();
oamModule.count(isRequest ? OamModule::Counter::RequestReceived : OamModule::Counter::AnswerReceived);
oamModule.count(isRequest ? OamModule::Counter::RequestReceivedOnClientSession : OamModule::Counter::AnswerReceivedOnClientSession);
// Statistic (size)
- a_parent->updateReceivedMessageSizeStatisticConcept(message.getSize()); // only on reception (application could manage sent sizes)
+ a_parent->updateReceivedMessageSizeStatisticConcept(message.getSize(), cid); // only on reception (application could manage sent sizes)
if(isRequest) {
/////////////////////////////
setState(State::Bound);
//activateTimer(); // Ya se invoca al inicio de este metodo ::receive
// Inform father server (availability changes):
- bool changes = a_parent->refreshAvailability();
+ a_parent->refreshAvailability();
//startClock();
}
}
anna::Millisecond current = (anna::Millisecond)anna::functions::millisecond();
anna::Millisecond request = response->getRequest()->getRequestTimestampMs();
anna::Millisecond timeToAnswerMs = current - request;
- a_parent->updateProcessingTimeStatisticConcept(timeToAnswerMs);
- LOGDEBUG
- (
- std::string msg = "This diameter request context lasted ";
- msg += anna::functions::asString(timeToAnswerMs);
- msg += " milliseconds at diameter server (included network time)";
- anna::Logger::debug(msg, ANNA_FILE_LOCATION);
- );
+ a_parent->updateProcessingTimeStatisticConcept(timeToAnswerMs, cid);
+ //LOGDEBUG
+ //(
+ // std::string msg = "This diameter request context lasted ";
+ // msg += anna::functions::asString(timeToAnswerMs);
+ // msg += " milliseconds at diameter server (included network time)";
+ // anna::Logger::debug(msg, ANNA_FILE_LOCATION);
+ //);
// Progress origin for tracking purposes on asyncronous boxes with both diameter interfaces (entities and clients)
Message * requestMessage = const_cast<Message*>(response->getRequest());
requestMessage->setRequestServerSessionKey(response->getRequest()->getRequestServerSessionKey()); // -1 means unkown/unset
void ClientSession::finalize() throw() {
LOGMETHOD(anna::TraceMethod traceMethod(a_className, "finalize", ANNA_FILE_LOCATION));
Session::finalize();
- // Check deprecated entity:
- const Entity *entity = getParent() /* server */ ->getParent() /* entity */;
// Inform father server (availability changes):
- bool changes = a_parent->refreshAvailability();
+ a_parent->refreshAvailability();
// OAM
const Server *server = getParent();
bool multipleConnections = (server->getMaxClientSessions() > 1);
}
// Inform father server (availability changes):
- bool changes = a_parent->refreshAvailability();
+ a_parent->refreshAvailability();
// OAM
const Server *server = getParent();
bool multipleConnections = (server->getMaxClientSessions() > 1);