anchor.diff:           handle_info/2]).
   -export([ranch_start_link/6, do_stop_server/1]).
   
  +-type server_ref() :: {nksip:protocol(), inet:ip_address(), inet:port_number()}.
  +
   
   %% ===================================================================
   %% Public
  
positive.code:     nksip_webserver_sup:start_child(Spec1).
   
  %% @private
  do_stop_server(Ref) ->
      SupRef = {ranch_listener_sup, Ref},
      nksip_webserver_sup:terminate_child(SupRef).
  
  
  %% @private
  do_update_server(Ref, Apps) ->
      Dispatch = lists:flatten([
          Disp0 ||
          #app_info{index={_, AppRef}, dispatch=Disp0} <- Apps,
          AppRef == Ref
      ]),
      cowboy:set_env(Ref, dispatch, cowboy_router:compile(Dispatch)).
  
  
  %% @private Gets socket options for listening connections
  
negative.code: 
  
  %% @private
  -spec do_start_server(server_ref(), list(), nksip_lib:proplist()) ->
      {ok, pid()} | {error, term()}.
  
  do_start_server(Ref, Dispatch, Opts) ->
      {Proto, Ip, Port} = Ref,
      Env = {env, [{dispatch, cowboy_router:compile(Dispatch)}]},
  