aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhlig <[email protected]>2019-08-08 14:44:54 +0200
committerjuhlig <[email protected]>2019-08-08 14:44:54 +0200
commit90924f38eeabe81a21452b4c85f40e0d92cc82d7 (patch)
tree8ed2444baef4a310f1db8dbacaf6eb29abd1c2d1
parentaf739162fd43d46f2562af96c56147054457518e (diff)
downloadranch-90924f38eeabe81a21452b4c85f40e0d92cc82d7.tar.gz
ranch-90924f38eeabe81a21452b4c85f40e0d92cc82d7.tar.bz2
ranch-90924f38eeabe81a21452b4c85f40e0d92cc82d7.zip
Update examples to use new transport options format
-rw-r--r--examples/tcp_echo/src/tcp_echo_app.erl3
-rw-r--r--examples/tcp_reverse/src/tcp_reverse_app.erl3
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/tcp_echo/src/tcp_echo_app.erl b/examples/tcp_echo/src/tcp_echo_app.erl
index 63cbbb4..41b676e 100644
--- a/examples/tcp_echo/src/tcp_echo_app.erl
+++ b/examples/tcp_echo/src/tcp_echo_app.erl
@@ -12,7 +12,8 @@
start(_Type, _Args) ->
{ok, _} = ranch:start_listener(tcp_echo,
- ranch_tcp, [{port, 5555}], echo_protocol, []),
+ ranch_tcp, #{socket_opts => [{port, 5555}]},
+ echo_protocol, []),
tcp_echo_sup:start_link().
stop(_State) ->
diff --git a/examples/tcp_reverse/src/tcp_reverse_app.erl b/examples/tcp_reverse/src/tcp_reverse_app.erl
index 1138d4a..c97f6ee 100644
--- a/examples/tcp_reverse/src/tcp_reverse_app.erl
+++ b/examples/tcp_reverse/src/tcp_reverse_app.erl
@@ -12,7 +12,8 @@
start(_Type, _Args) ->
{ok, _} = ranch:start_listener(tcp_reverse,
- ranch_tcp, [{port, 5555}], reverse_protocol, []),
+ ranch_tcp, #{socket_opts => [{port, 5555}]},
+ reverse_protocol, []),
tcp_reverse_sup:start_link().
stop(_State) ->