From 4f0b8e5eb61a2019285bfc7a8e50af1d338ffd63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 11 Feb 2019 17:04:35 +0100 Subject: ssl: Document {active,N} --- lib/ssl/doc/src/ssl.xml | 21 ++++++++++++--------- lib/ssl/src/ssl.erl | 2 +- 2 files changed, 13 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml index 21ea1be4b4..78106b8502 100644 --- a/lib/ssl/doc/src/ssl.xml +++ b/lib/ssl/doc/src/ssl.xml @@ -97,9 +97,12 @@ -

When an TLS/DTLS socket is in active mode (the default), data from the +

When a TLS/DTLS socket is in active mode (the default), data from the socket is delivered to the owner of the socket in the form of messages as described above.

+

The ssl_passive message is sent only when the socket is in + {active, N} mode and the counter dropped to 0. It indicates + that the socket has transitioned to passive ({active, false}) mode.

@@ -1169,8 +1172,8 @@ fun(srp, Username :: string(), UserState :: term()) -> marker="#handshake_cancel-1">handshake_cancel/1.

-

If the option active is set to once or true the - process owning the sslsocket will receive messages of type +

If the option active is set to once, true or an integer value, + the process owning the sslsocket will receive messages of type active_msgs()

@@ -1217,8 +1220,8 @@ fun(srp, Username :: string(), UserState :: term()) -> marker="#handshake_cancel-1">handshake_cancel/1.

-

If the option active is set to once or true the - process owning the sslsocket will receive messages of type +

If the option active is set to once, true or an integer value, + the process owning the sslsocket will receive messages of type active_msgs()

@@ -1379,8 +1382,8 @@ fun(srp, Username :: string(), UserState :: term()) ->

Performs the SSL/TLS/DTLS server-side handshake.

Returns a new TLS/DTLS socket if the handshake is successful.

-

If the option active is set to once or true the - process owning the sslsocket will receive messages of type +

If the option active is set to once, true or an integer value, + the process owning the sslsocket will receive messages of type active_msgs()

@@ -1424,8 +1427,8 @@ fun(srp, Username :: string(), UserState :: term()) -> marker="#handshake_cancel-1">handshake_cancel/1.

-

If the option active is set to once or true the - process owning the sslsocket will receive messages of type +

If the option active is set to once, true or an integer value, + the process owning the sslsocket will receive messages of type active_msgs()

diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index c39a6f1603..c95d29df2c 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -99,7 +99,7 @@ -type tls_client_option() :: client_option() | socket_connect_option() | transport_option(). -type tls_server_option() :: server_option() | socket_listen_option() | transport_option(). -type active_msgs() :: {ssl, sslsocket(), Data::binary() | list()} | {ssl_closed, sslsocket()} | - {ssl_error, sslsocket(), Reason::term()}. + {ssl_error, sslsocket(), Reason::term()} | {ssl_passive, sslsocket()}. -type transport_option() :: {cb_info, {CallbackModule::atom(), DataTag::atom(), ClosedTag::atom(), ErrTag::atom()}}. -type path() :: file:filename(). -- cgit v1.2.3