diff options
author | Péter Dimitrov <[email protected]> | 2019-04-24 15:10:16 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-04-30 17:19:08 +0200 |
commit | 4507360b4701b48cf33f7f2251626da29bc8176a (patch) | |
tree | 33cc0342a1d30f0706d99bea2eb7ac9f3435313a /lib/ssl | |
parent | 8b78203da881bb56e71d44b17b7d335546ad89bf (diff) | |
download | otp-4507360b4701b48cf33f7f2251626da29bc8176a.tar.gz otp-4507360b4701b48cf33f7f2251626da29bc8176a.tar.bz2 otp-4507360b4701b48cf33f7f2251626da29bc8176a.zip |
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
Diffstat (limited to 'lib/ssl')
-rw-r--r-- | lib/ssl/doc/src/ssl.xml | 5 | ||||
-rw-r--r-- | lib/ssl/src/ssl.erl | 9 |
2 files changed, 11 insertions, 3 deletions
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()) -> <name since="" name="recv" arity="2" /> <name since="" name="recv" arity="3" /> <fsummary>Receives data on a socket.</fsummary> + <type_desc variable="HttpPacket">See the description of + <c>HttpPacket</c> in + <seealso marker="erts:erlang#decode_packet/3"><c>erlang:decode_packet/3</c></seealso> + in ERTS. + </type_desc> <desc> <p>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)-> |