anchor.diff:      % io:format("handle_cast ~p~n", [_Msg]),
   	{noreply, State}.
   
  -handle_info({tcp, Sock, Data}, #state{buf=Buf, native_if_mod=_Mod, is_secure=_IsSec}=State) ->
  +handle_info({tcp, Sock, Data}, #state{buf=Buf}=State) ->
       ok = inet:setopts(Sock, [{active, once}]),
       NewBuf = <<Buf/binary, Data/binary>>,
       Res = (catch binary_to_term(NewBuf)),
  
positive.code:                 {ok, LSock} ->
                      io:format("~p started imem_server ~p @ ~p~n", [self(), LSock, {ListenIf, ListenPort}]),
                      gen_server:cast(self(), accept),
                      {ok, #state{lsock=LSock, native_if_mod=NativeIfMod, is_secure=IsSec}};
                  Reason ->
                      io:format("~p imem_server not started ~p~n", [self(), Reason]),
                      {ok, #state{}}
              end;
          _ ->
              {stop, disabled}
      end.
  
  handle_call(_Request, _From, State) ->
      % io:format("handle_call ~p~n", [_Request]),
      {reply, ok, State}.
  
  handle_cast(accept, #state{lsock=LSock, native_if_mod=NativeIfMod, is_secure=IsSec}=State) ->
      {ok, Sock} = gen_tcp:accept(LSock),
      % io:format("accept conn ~p~n", [Sock]),
      {ok,Pid} = gen_server:start(?MODULE, [Sock, NativeIfMod, IsSec], []),
      ok = gen_tcp:controlling_process(Sock, Pid),
      gen_server:cast(Pid, activate),
      gen_server:cast(self(), accept),
  
negative.code:         , csock = undefined
          , buf = <<>>
          , native_if_mod
      }).
  
  -export([start_srv/2
          , stop_srv/0
  		]).
  
  -export([start_link/1
          , init/1
  