From 212ff19f5d9950f680be3b52cb53994b2df734d4 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Fri, 15 Feb 2019 15:02:09 +0100 Subject: Document acknowledgements in transport interface This is the {diameter, ack} message from a transport process to its parent that requests that every Diameter request passed to the parent be matched by a incoming send message, the atom false replacing a message() in the case that the request is unanswered, allowing the transport to keep track of the number of outstanding requests. These were added in commit ca09cf7b, and are used to implement the message_cb config in diameter_tcp/sctp, documented in commit cefcaa5c. This commit documents the interface, to make it available to other transport implementations. --- lib/diameter/doc/src/diameter_transport.xml | 31 ++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'lib/diameter') diff --git a/lib/diameter/doc/src/diameter_transport.xml b/lib/diameter/doc/src/diameter_transport.xml index 294e8a8864..099c600bf3 100644 --- a/lib/diameter/doc/src/diameter_transport.xml +++ b/lib/diameter/doc/src/diameter_transport.xml @@ -14,7 +14,8 @@
-20112016 +2011 +2019 Ericsson AB. All Rights Reserved. @@ -174,10 +175,13 @@ its parent.

-{diameter, {send, &message;}} +{diameter, {send, &message; | false}}

-An outbound Diameter message.

+An outbound Diameter message. +The atom false can only be received when request +acknowledgements have been requests: see the ack message +below.

{diameter, {close, Pid}} @@ -246,6 +250,27 @@ A LocalAddr list has the same semantics as one returned from &start;.

+{diameter, ack} + +

+Request acknowledgements of unanswered requests. +A transport process should send this once before passing incoming +Diameter messages into diameter. +As a result, every Diameter request passed into diameter with a +recv message (below) will be answered with a +send message (above), either a &message; for the transport +process to send or the atom false if the request has been +discarded or otherwise not answered.

+ +

+This is to allow a transport process to keep count of the number +of incoming request messages that have not yet been answered or +discarded, to allow it to regulate the amount of incoming traffic. +Both diameter_tcp and diameter_sctp request acknowledgements when a +message_cb is configured, turning send/recv message into +callbacks that can be used to regulate traffic.

+
+ {diameter, {recv, &message;}}

-- cgit v1.2.3