anchor.diff:  -behaviour(application).
   
   %% Application callbacks
  --export([start/2, prep_stop/1, stop/1]).
  +-export([start/2, stop/1]).
   
   -define(PRINT_MSG(Msg), io:format(Msg)).
   
  
positive.code:         {Name, start_link, [Opts]},
              permanent, 10000, worker, [Name]}.
  
  %% close all listeners first...
  prep_stop(State) ->
      stop_listeners(),
      State.
  
  stop_listeners() ->
      %% ensure that esockd applications is started?
  
negative.code:             emqttd:close_listeners(Listeners)
      end.
  
  