aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-05-31 14:11:38 +0200
committerLoïc Hoguin <[email protected]>2017-05-31 14:11:38 +0200
commit2730f7188738cc7b1100e50bcc8567d33ecb3934 (patch)
tree66d1daac50363684954316dc6b371a51188ce6f8 /examples
parenta004ad710eddd0c21aaccc30d5633a76b06164b5 (diff)
downloadranch-2730f7188738cc7b1100e50bcc8567d33ecb3934.tar.gz
ranch-2730f7188738cc7b1100e50bcc8567d33ecb3934.tar.bz2
ranch-2730f7188738cc7b1100e50bcc8567d33ecb3934.zip
Deprecated ranch:start_listener/6 and child_spec/6
The NumAcceptors argument has been moved to transport option num_acceptor, which defaults to 10. The functions now take one less argument. The old functions are still here, though deprecated.
Diffstat (limited to 'examples')
-rw-r--r--examples/tcp_echo/src/tcp_echo_app.erl2
-rw-r--r--examples/tcp_reverse/src/tcp_reverse_app.erl2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/tcp_echo/src/tcp_echo_app.erl b/examples/tcp_echo/src/tcp_echo_app.erl
index 7fac685..63cbbb4 100644
--- a/examples/tcp_echo/src/tcp_echo_app.erl
+++ b/examples/tcp_echo/src/tcp_echo_app.erl
@@ -11,7 +11,7 @@
%% API.
start(_Type, _Args) ->
- {ok, _} = ranch:start_listener(tcp_echo, 1,
+ {ok, _} = ranch:start_listener(tcp_echo,
ranch_tcp, [{port, 5555}], echo_protocol, []),
tcp_echo_sup:start_link().
diff --git a/examples/tcp_reverse/src/tcp_reverse_app.erl b/examples/tcp_reverse/src/tcp_reverse_app.erl
index 106e527..1138d4a 100644
--- a/examples/tcp_reverse/src/tcp_reverse_app.erl
+++ b/examples/tcp_reverse/src/tcp_reverse_app.erl
@@ -11,7 +11,7 @@
%% API.
start(_Type, _Args) ->
- {ok, _} = ranch:start_listener(tcp_reverse, 10,
+ {ok, _} = ranch:start_listener(tcp_reverse,
ranch_tcp, [{port, 5555}], reverse_protocol, []),
tcp_reverse_sup:start_link().