From 4507360b4701b48cf33f7f2251626da29bc8176a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Dimitrov?= Date: Wed, 24 Apr 2019 15:10:16 +0200 Subject: ssl: Refer documentation of HttpPacket from erts Do not document http_packet() in ssl but refer to description of erlang:decode_packet/3. Change-Id: Ib2d0e4fc9605e40fe98bb249bc17fc39046d137a Conflicts: lib/ssl/src/ssl.erl --- lib/ssl/doc/src/ssl.xml | 5 +++++ lib/ssl/src/ssl.erl | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml index 9c170d08af..2ab21f43e0 100644 --- a/lib/ssl/doc/src/ssl.xml +++ b/lib/ssl/doc/src/ssl.xml @@ -1425,6 +1425,11 @@ fun(srp, Username :: string(), UserState :: term()) -> Receives data on a socket. + See the description of + HttpPacket in + erlang:decode_packet/3 + in ERTS. +

Receives a packet from a socket in passive mode. A closed socket is indicated by return value diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl index bd619d7a0a..51e3b9e6ab 100644 --- a/lib/ssl/src/ssl.erl +++ b/lib/ssl/src/ssl.erl @@ -217,6 +217,7 @@ bad_certificate_hash_value | unknown_psk_identity | no_application_protocol. + %% ------------------------------------------------------------------------------------------------------- -type common_option() :: {protocol, protocol()} | {handshake, handshake_completion()} | @@ -733,7 +734,8 @@ send(#sslsocket{pid = {ListenSocket, #config{transport_info = Info}}}, Data) -> -spec recv(SslSocket, Length) -> {ok, Data} | {error, reason()} when SslSocket :: sslsocket(), Length :: integer(), - Data :: binary() | list(). + Data :: binary() | list() | HttpPacket, + HttpPacket :: any(). recv(Socket, Length) -> recv(Socket, Length, infinity). @@ -741,8 +743,9 @@ recv(Socket, Length) -> -spec recv(SslSocket, Length, Timeout) -> {ok, Data} | {error, reason()} when SslSocket :: sslsocket(), Length :: integer(), - Data :: binary() | list(), - Timeout :: timeout(). + Data :: binary() | list() | HttpPacket, + Timeout :: timeout(), + HttpPacket :: any(). recv(#sslsocket{pid = [Pid|_]}, Length, Timeout) when is_pid(Pid), (is_integer(Timeout) andalso Timeout >= 0) or (Timeout == infinity)-> -- cgit v1.2.3