From cefcaa5c1a3f49e2c8e277962326dfdb53ce6a4f Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Tue, 19 Sep 2017 18:14:04 +0200 Subject: Document new(ish) options in diameter_tcp/sctp See commits d3829525 (unordered), c591056b (packet), eadf4efc (sender), 636a7199 (tcp message_cb), 373cd07c (sctp message_cb) --- lib/diameter/doc/src/diameter_tcp.xml | 45 +++++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) (limited to 'lib/diameter/doc/src/diameter_tcp.xml') diff --git a/lib/diameter/doc/src/diameter_tcp.xml b/lib/diameter/doc/src/diameter_tcp.xml index 6ca280c52b..4644a05331 100644 --- a/lib/diameter/doc/src/diameter_tcp.xml +++ b/lib/diameter/doc/src/diameter_tcp.xml @@ -27,7 +27,8 @@
-20112016 +2011 +2017 Ericsson AB. All Rights Reserved. @@ -99,7 +100,9 @@ before configuring TLS capability on diameter transports.

| {rport, integer()} | {accept, Match} | {port, integer()} - | {fragment_timer, infinity | 0..16#FFFFFFFF} + | {fragment_timer, infinity | 0..16#FFFFFFFF} + | {message_cb, &mod_eval;} + | {sender, boolean()} SslOpt = {ssl_options, true | list()} TcpOpt = term() Match = &ip_address; | string() | [Match] @@ -140,6 +143,44 @@ such a message is received over the transport interface after two successive timeouts without the reception of additional bytes. Defaults to 1000.

+ +

+Option sender specifies whether or not to use a dedicated +process for sending outgoing messages, which avoids the possibility of +send blocking reception. +Defaults to false. +If set to true then a message_cb that avoids the +possibility of messages being queued in the sender process without +bound should be configured.

+ +

+Option message_cb specifies a callback that is invoked on +incoming and outgoing messages, that can be used to implement +flow control. +It is applied to two arguments: an atom indicating the +reason for the callback (send, recv, or ack after +a completed send), and the message in question (binary() on +recv, binary() or diameter_packet record on send or +ack, or false on ack when an incoming request has +been discarded). +It should return a list of actions and a new callback as +tail; eg. [fun cb/3, State]. +Valid actions are the atoms send or recv, to +cause a following message-valued action to be sent/received, +a message to send/receive (binary() or +diameter_packet record), or a boolean() to enable/disable reading on +the socket. +More than one send/recv/message sequence can be +returned from the same callback, and an initial +send/recv can be omitted if the same as the value passed +as the callback's first argument. +Reading is initially enabled, and returning false does not +imply there cannot be subsequent recv callbacks since +messages may already have been read. +An empty tail is equivalent to the prevailing callback. +Defaults to a callback equivalent to fun(ack, _) -> []; (_, Msg) -> +[Msg] end.

+

Remaining options are any accepted by &ssl_connect3; or &gen_tcp_connect3; for -- cgit v1.2.3