Base protocol codec for comm::Engine. Supported retransmissions
[anna.git] / include / anna / diameter.comm / Entity.hpp
index 151f0ff..d0da8c5 100644 (file)
@@ -19,6 +19,8 @@
 #include <anna/core/RuntimeException.hpp>
 #include <anna/core/util/Millisecond.hpp>
 
+#include <anna/diameter.comm/ClassCode.hpp>
+
 
 namespace anna {
 class DataBlock;
@@ -39,6 +41,7 @@ class Engine;
 class Server;
 class Response;
 class Message;
+class ClientSession;
 
 
 /**
@@ -131,6 +134,11 @@ public:
   */
   void setEngine(Engine *e) throw() { a_engine = e; }
 
+//  /**
+//  * Gets the diameter::comm::Engine
+//  * @return Diameter::comm::Engine
+//  */
+//  Engine *getEngine() const throw() { return a_engine; }
 
   /**
   * Add a server to the entity and create all the servers configured at #setSocketsPerDiameterServer within that server.
@@ -208,7 +216,7 @@ public:
 //   */
 
 // OJO: en el caso estandard, no se prueban todas las sessiones de un servidor si tiene mas de una, luego la alarma
-//      generada en caso de error, presupone que las sessiones no usadas, también darían error, lo cual no tiene porque
+//      generada en caso de error, presupone que las sessiones no usadas, tambi�n dar�an error, lo cual no tiene porque
 //      ser cierto. En condiciones normales, los servidores tienen una session, con lo que lo anterior es cierto y el
 //      la practica es lo mas normal.
 
@@ -413,6 +421,14 @@ protected:
   */
   virtual void eventPeerShutdown(const ClientSession* clientSession) throw();
 
+  /**
+     Handler about a request retransmission over the session.
+     Default implementation traces warning event
+     \param clientSession ClientSession from which retransmission happened
+     \param request Retransmitted request message
+  */
+  virtual void eventRequestRetransmission(const ClientSession* clientSession, Message *request) throw();
+
   /**
      Handler for diameter server (server) responses