aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-05-09 10:43:25 +0200
committerLoïc Hoguin <[email protected]>2019-05-09 10:47:15 +0200
commit3ea575d8682560fc02d5583cbf2837e2f2f43e9f (patch)
treea20024277c5bad93fd05d9a32013ecabfeddd485 /doc/src
parente92171a8f80755dad795691ad9e07807212d0d1c (diff)
downloadranch-3ea575d8682560fc02d5583cbf2837e2f2f43e9f.tar.gz
ranch-3ea575d8682560fc02d5583cbf2837e2f2f43e9f.tar.bz2
ranch-3ea575d8682560fc02d5583cbf2837e2f2f43e9f.zip
Remove Socket argument from ranch_protocol:start_link
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/guide/protocols.asciidoc8
-rw-r--r--doc/src/manual/ranch.handshake.asciidoc5
-rw-r--r--doc/src/manual/ranch_protocol.asciidoc8
3 files changed, 8 insertions, 13 deletions
diff --git a/doc/src/guide/protocols.asciidoc b/doc/src/guide/protocols.asciidoc
index 8f77ef4..89360ef 100644
--- a/doc/src/guide/protocols.asciidoc
+++ b/doc/src/guide/protocols.asciidoc
@@ -38,10 +38,10 @@ in `examples/tcp_echo/`.
-module(echo_protocol).
-behaviour(ranch_protocol).
--export([start_link/4]).
+-export([start_link/3]).
-export([init/3]).
-start_link(Ref, _Socket, Transport, Opts) ->
+start_link(Ref, Transport, Opts) ->
Pid = spawn_link(?MODULE, init, [Ref, Transport, Opts]),
{ok, Pid}.
@@ -80,11 +80,11 @@ the normal `gen_statem` execution loop.
-behaviour(gen_statem).
-behaviour(ranch_protocol).
--export([start_link/4]).
+-export([start_link/3]).
-export([init/1]).
%% Exports of other gen_statem callbacks here.
-start_link(Ref, _Socket, Transport, Opts) ->
+start_link(Ref, Transport, Opts) ->
{ok, proc_lib:spawn_link(?MODULE, init, [{Ref, Transport, Opts}])}.
init({Ref, Transport, _Opts = []}) ->
diff --git a/doc/src/manual/ranch.handshake.asciidoc b/doc/src/manual/ranch.handshake.asciidoc
index c8a6ee9..5d2694c 100644
--- a/doc/src/manual/ranch.handshake.asciidoc
+++ b/doc/src/manual/ranch.handshake.asciidoc
@@ -24,11 +24,6 @@ handshake necessary to give control of the socket to this
process and also does the transport handshake, for example
setting up the TLS connection.
-Currently the socket can be obtained from a
-`Protocol:start_link/4` argument and as a return value
-from `ranch:handshake/1,2`. In Ranch 2.0 the socket will
-only be available from `ranch:handshake/1,2`.
-
== Arguments
Ref::
diff --git a/doc/src/manual/ranch_protocol.asciidoc b/doc/src/manual/ranch_protocol.asciidoc
index 8e8c0e0..5a94399 100644
--- a/doc/src/manual/ranch_protocol.asciidoc
+++ b/doc/src/manual/ranch_protocol.asciidoc
@@ -16,7 +16,6 @@ Ranch protocols implement the following interface:
[source,erlang]
----
start_link(Ref :: ranch:ref(),
- _,
Transport :: module(),
ProtoOpts :: any())
-> {ok, ConnPid :: pid()}
@@ -46,9 +45,10 @@ processes and degrade performance severely.
== Changelog
-* *1.6*: The second argument `Socket` was deprecated and will
- be removed in Ranch 2.0. The socket should be obtained
- by calling link:man:ranch:handshake(3)[ranch:handshake(3)].
+* *2.0*: The second argument `Socket` was removed.
+* *1.6*: The second argument `Socket` was deprecated. Call
+ link:man:ranch:handshake(3)[ranch:handshake(3)]
+ to obtain the socket.
== See also