anchor.diff:                    ),
       ConnectOpts = [binary, {active, false}] ++ TcpOpts,
       case gen_tcp:connect(Address, Port, ConnectOpts, Timeout) of
  -        {ok, Sock} ->
  -            State = #state{sock=Sock, options=Options, registrees=Registrees},
  +        {ok, Socket} ->
  +            State = #state{socket=Socket,
  +                           options=Options,
  +                           registrees=Registrees},
               init_req(State);
           {error, timeout} ->
               {stop, connect_timeout};
  
positive.code:     {noreply, State}.
  
  
  handle_info(Info, State) ->
      lager:warning("Unknown info: ~p", [Info]),
      {noreply, State}.
  
  
  terminate(Reason, #state{sock=Sock}) ->
      lager:debug("Terminating ~p because of ~p", [self(), Reason]),
      gen_tcp:close(Sock).
  
  
  code_change(_Old, State, _Extra) ->
  
negative.code:     State2 = State#state{next_packet_id = next_packet_id(PacketId)},
      {gen_tcp:send(Socket, Packet), State2}.
  
  %%% @doc Handle incoming data from the socket.
  %%%
  %%% We receive a list here: first two bytes are always in a list,
  %%% the rest is improper binary.
  %-spec handle_tcp_recv(Msg, State) -> {noreply, State} when
  %      Msg :: binary(),
  %      State :: state().
  %handle_tcp_recv(_Msg, State) ->
  %    {noreply, State}.
  
  -spec parse_headers(Binary, NH) -> [{Key, Value}] when
        Binary :: binary(),
        NH :: pos_integer(),
  