tcp_echo_app.erl 346 B

12345678910111213141516171819
  1. %% Feel free to use, reuse and abuse the code in this file.
  2. %% @private
  3. -module(tcp_echo_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_echo, 1,
  11. ranch_tcp, [{port, 5555}], echo_protocol, []),
  12. tcp_echo_sup:start_link().
  13. stop(_State) ->
  14. ok.