anchor.diff:      {ok, Port} = inet:port(Sock),
       i2b(Port).
   
  -%% Short func for list to binary
  -l2b(L) ->
  +%% Short func for 'binary_to_list'
  +b2l(B) when is_binary(B) ->
  +    binary_to_list(B).
  +
  +%% Short func for 'list_to_binary'
  +l2b(L) when is_list(L) ->
       list_to_binary(L).
   
  -%% Short func for integer to binary
  -i2b(I) ->
  +%% Short func for 'integer_to_binary'
  +i2b(I) when is_integer(I) ->
       list_to_binary(integer_to_list(I)).
  +
  +%% Convert -> <<"666\r\n">> to normal integer
  +int_offset(B) when is_binary(B) ->
  +    B2 = hd(binary:split(B, <<"\r\n">>)), % First element of binary
  +    binary_to_integer(B2);
  +int_offset(_) ->
  +    throw("error in binary offset").
positive.code:             {error, "Generic error"}
      end.
  
  recv_ok(Sock) ->
      inet:setopts(Sock, [{active,once}]),
      receive
          {tcp, Sock, <<"+OK", _/binary>>} ->
              ok;
          {tcp, _Sock, <<"-ERR Unrecognized REPLCONF", _/binary>>} ->
              {foo, bar}; % FIX ME
          {tcp, _Sock, Data} ->
              io:format("invalid data received '~p' ~n", [Data]),
              {error, "invalid data received"};
  
negative.code:     handle_sock(sync(Sock), S);
  
  %% LOAD RDB DATA
  handle_cast({load_rdb, Bulk}, S = #state{socket=_Sock, state=lalala}) -> % FIXME
      rdb:save(Bulk, ?RDB_FILE),
      rdb:load(self(), ?RDB_FILE),
      io:format("load_rdb data -> ~p ~n", [Bulk]),
      {noreply, S};
  
  