anchor.diff:                         _ ->
                              [binary_to_term(Item)|Acc]
                      end,
  -            recv_1(Len2, Rest4, Acc1);
  +            recv_1(Len2, Rest4, Acc1, NextBin);
           false ->
  -            {recv_error, {invalid_data_length, Len, Type, Rest1}}
  -    end.
  -
  -
  +            {error, {invalid_data_length, Len, Type, Rest1}}
  +    end.
  +
  +
  
positive.code:         {ok, Rest} ->
              recv(Socket, <<Bin/binary, Rest/binary>>, 8);
          _ ->
              {recv_error, {invalid_data_length, GotSize}}
      end;
  recv(Socket, << "*",
                  Type:?BLEN_TYPE_LEN/binary,
                  BodyLen:?BLEN_BODY_LEN/integer, "\r\n", Rest/binary >>, Size) ->
      GotSize = byte_size(Rest),
      WantSize = BodyLen + 2 - GotSize,
      case WantSize of
          0 ->
              recv_0(Type, <<Rest/binary>>);
          RecvByte when RecvByte < 0 ->
              {recv_error, {invalid_data_length, RecvByte}};
          RecvByte ->
              case gen_tcp:recv(Socket, RecvByte, ?RECV_TIMEOUT) of
                  {ok, Rest2} ->
                      recv_0(Type, <<Rest/binary, Rest2/binary>>);
                  _ ->
                      {recv_error, {invalid_data_length, Size}}
              end
      end.
  
  recv_0(?BIN_ORG_TYPE_BIN, << Len:?BLEN_PARAM_TERM/integer, "\r\n", Rest/binary >>) ->
      << RetBin:Len/binary, "\r\n\r\n" >> = Rest,
      RetBin;
  recv_0(?BIN_ORG_TYPE_TERM, << Len:?BLEN_PARAM_TERM/integer, "\r\n", Rest/binary >>) ->
      << Term:Len/binary, "\r\n\r\n" >> = Rest,
      binary_to_term(Term);
  recv_0(?BIN_ORG_TYPE_TUPLE, << Len:?BLEN_PARAM_TERM/integer, "\r\n", Rest/binary >>) ->
      recv_1(Len, Rest, []);
  recv_0(InvalidType, _Rest) ->
      {recv_error, {invalid_root_type, InvalidType}}.
  
  recv_1(_, <<"\r\n">>, Acc) ->
      list_to_tuple(Acc);
  recv_1(Len, << "B\r\n", Rest1/binary >>, Acc) ->
      recv_2(Len, ?BIN_ORG_TYPE_BIN, Rest1, Acc);
  recv_1(Len, << "M\r\n", Rest1/binary >>, Acc) ->
      recv_2(Len, ?BIN_ORG_TYPE_TERM, Rest1, Acc);
  recv_1(Len, << "T\r\n", Rest1/binary >>, Acc) ->
      recv_2(Len, ?BIN_ORG_TYPE_TUPLE, Rest1, Acc);
  recv_1(_,_InvalidBlock,_) ->
      {recv_error, {invalid_tuple_type, _InvalidBlock}}.
  
  recv_2(Len, Type, Rest1, Acc) ->
      case (byte_size(Rest1) > Len) of
          true ->
              << Item:Len/binary, "\r\n", Rest2/binary >> = Rest1,
  
negative.code:     {noreply, State}.
  
  
  handle_info({tcp, Socket, Bs}, #state{buf = Buf} = State) ->
      Res = recv(Socket, <<Buf/binary, Bs/binary>>),
      case Res of
          {error, Cause} ->
              {stop, Cause, State};
          {value, Value, Rest} ->
              inet:setopts(Socket, [{active, once}]),
              NewState = State#state{buf = Rest},
              {noreply, handle_response(Value, NewState)}
      end;
  handle_info({tcp_error, _Socket, _Reason}, State) ->
      {noreply, State};
  