tcp_reverse_app.erl 381 B

1234567891011121314151617181920
  1. %% Feel free to use, reuse and abuse the code in this file.
  2. %% @private
  3. -module(tcp_reverse_app).
  4. -behaviour(application).
  5. %% API.
  6. -export([start/2]).
  7. -export([stop/1]).
  8. %% API.
  9. start(_Type, _Args) ->
  10. {ok, _} = ranch:start_listener(tcp_reverse,
  11. ranch_tcp, #{socket_opts => [{port, 5555}]},
  12. reverse_protocol, []),
  13. tcp_reverse_sup:start_link().
  14. stop(_State) ->
  15. ok.