anchor.diff:  
   handle_call({tcp_server_connection_count, Port}, _From, State) ->
       Reply = case get_endpoint(Port, State) of
  -                undefined ->
  -                    {error, wrong_endpoint};
  -                Endpoint ->
  -                    {ok, length(Endpoint#endpoint.connections)}
  -            end,
  +        undefined ->
  +            {error, wrong_endpoint};
  +        Endpoint ->
  +            {ok, length(Endpoint#endpoint.connections)}
  +    end,
       {reply, Reply, State};
   
   handle_call(_Request, _From, State) ->
  
positive.code:     {noreply, NewState :: #state{}, timeout() | hibernate} |
      {stop, Reason :: term(), Reply :: term(), NewState :: #state{}} |
      {stop, Reason :: term(), NewState :: #state{}}).
  handle_call(healthcheck, _From, State) ->
      Reply =
          try
              % Check connectivity to all TCP listeners
              lists:foreach(
                  fun(#endpoint{port = Port, use_ssl = UseSSL}) ->
                      case UseSSL of
                          true ->
                              {ok, Socket} = ssl:connect("127.0.0.1", Port, []),
                              ssl:close(Socket);
                          false ->
                              {ok, Socket} = gen_tcp:connect("127.0.0.1", Port, []),
                              gen_tcp:close(Socket)
                      end
                  end, get_all_endpoints(State)),
              ok
          catch T:M ->
              ?error_stacktrace("Error during ~p healthcheck- ~p:~p", [?MODULE, T, M]),
              error
          end,
      {reply, Reply, State};
  
  
  handle_call({report_connection_state, Port, Pid, IsAlive}, _From, State) ->
      Endpoint = get_endpoint(Port, State),
      Connectiond = Endpoint#endpoint.connections,
      NewConnections = case IsAlive of
                           true -> [Pid | Connectiond];
                           false -> lists:delete(Pid, Connectiond)
                       end,
      {reply, ok, update_endpoint(Endpoint#endpoint{connections = NewConnections}, State)};
  
  handle_call({register_packet, Port, Data}, _From, State) ->
  
negative.code:     MsgHistory = Endpoint#endpoint.msg_history,
      HistoryEnabled = Endpoint#endpoint.history_enabled,
      NewHistory = case HistoryEnabled of
          true -> append_to_history(Data, MsgHistory);
          false -> MsgHistory
      end,
      NewEndpoint = Endpoint#endpoint{
          msg_count_per_msg = dict:update(Data, fun(Old) ->
              Old + 1 end, 1, MsgCountPerMsg),
  