X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fdiameter.comm%2FMessage.hpp;h=9fc265a83ae8c20b95e0d2d847bac5d392e9da41;hb=129af2a9a7c287843be5bd443c5b1ad9b08438a8;hp=b5cb45950ac7f3612115ad5f161c7b8451d89315;hpb=6f990d26c49e6f5bbb31cb1a2a47615918b6c339;p=anna.git diff --git a/include/anna/diameter.comm/Message.hpp b/include/anna/diameter.comm/Message.hpp index b5cb459..9fc265a 100644 --- a/include/anna/diameter.comm/Message.hpp +++ b/include/anna/diameter.comm/Message.hpp @@ -48,7 +48,7 @@ public: /** * Define las acciones a realizar en caso de que el temporizador de la petici�n expire. */ - struct OnExpiry { enum _v { Abandon, Ignore }; }; + struct OnExpiry { enum _v { Abandon, Ignore, Retransmit }; }; /** Constructor. @@ -112,19 +112,26 @@ public: // http://diameter-protocol.blogspot.com.es/2011/05/diameter-message-structure-and-message.html /** - * In general, diameter agents CANNOT modify the end-to-end value during sending the message to the peer. - * That 'true' value stands for intermediate agents and also for retransmissions (must keep end-to-end - * during 4 minutes even upon reboots). False is used for new request created from end points (originators) - * as diameter clients. + * In general, diameter nodes will sequence the End-To-End value when sending new requests. + * A 'false' value stands for intermediate agents (must keep end-to-end during 4 minutes even upon reboots). */ - bool updateEndToEnd() const throw() { return a_updateEndToEnd; } + bool endToEndSequenced() const throw() { return a_endToEndSequenced; } /** - * In general, diameter agents CANNOT modify the end-to-end value during sending the message to the peer. - * The appropiate behaviour must be configured before sending the message. By default, the diameter::comm - * message will sequence the end-to-end increasing the initial value created during session establishment. + * By default, the diameter::comm message will sequence the end-to-end increasing the initial value created + * during session establishment. Anyway you could change this behaviour with this method. + * + * @see sequenceEndToEnd + */ + void forwardEndToEnd() throw() { a_endToEndSequenced = false; } + + /** + * By default, the diameter::comm message will sequence the end-to-end increasing the initial value created + * during session establishment. Anyway you could set again this behaviour with this method. + * + * @see forwardEndToEnd */ - void updateEndToEnd(bool update) throw() { a_updateEndToEnd = update; } + void sequenceEndToEnd() throw() { a_endToEndSequenced = true; } // Statistics @@ -147,12 +154,12 @@ public: /** Initializes class information */ void initialize() throw() { - a_retries = 0; + a_retries = 1; a_requestServerSessionKey = -1; // means unknown/unset a_requestClientSessionKey = ""; // means unknown/unset a_requestHopByHop = 0; a_requestEndToEnd = 0; - a_updateEndToEnd = true; + a_endToEndSequenced = true; } @@ -176,7 +183,7 @@ private: std::string a_requestClientSessionKey; // idem for request which was received from servers HopByHop a_requestHopByHop; // application backup for hop-by-hop in order to restore on answer receive EndToEnd a_requestEndToEnd; // application backup for end-to-end in order to restore on answer receive - bool a_updateEndToEnd; // end-to-end will be updated + bool a_endToEndSequenced; // end-to-end will be sequenced by default (true) void send(ClientSession&) const throw(anna::RuntimeException); void send(ServerSession&) const throw(anna::RuntimeException);