Skip to content

Commit

Permalink
Update examples to use new transport options format
Browse files Browse the repository at this point in the history
  • Loading branch information
juhlig committed Aug 8, 2019
1 parent af73916 commit 90924f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/tcp_echo/src/tcp_echo_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down
3 changes: 2 additions & 1 deletion examples/tcp_reverse/src/tcp_reverse_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit 90924f3

Please sign in to comment.