anchor.diff:              {error, Reason}
       end.
   
  +recv(#handle{socket=S,timeout=T,seqnum=N}=H) ->
  +    case baseline_socket:recv(S, 4, T) of
  +        {ok, <<L:24/little,N>>, S1} ->
  +            case baseline_socket:recv(S1, L, T) of
  +                {ok, Packet, S2} ->
  +                    {ok, Packet, H#handle{socket = S2, seqnum = N+1,
  +                                          buf = <<>>, start = 0, length = 0}};
  +                {error, Reason} ->
  +                    {error, Reason}
  +            end;
  +        {error, Reason} ->
  +            {error, Reason}
  +    end.
  +
   recv_binary(#handle{buf=B,start=S,length=L}=H, Length, true) ->
       {ok, binary_part(B,S,Length), H#handle{start = S+Length, length = L-Length}};
   recv_binary(#handle{buf=B,start=S,length=L}=H, Length, false) ->
  
positive.code: 
  %% -- public --
  -export([connect/4, close/1]).
  -export([recv/1]).
  -export([recv/3, send/3]).
  -export([recv_binary/2, recv_text/2]).
  -export([remains/1]).
  
negative.code:          {mode, binary},
           {packet, raw},
           {packet_size, MaxLength} % TODO
           %%{send_timeout, ...}
           %%{send_timeout_close, true}
          ],
      case baseline_socket:connect(Address, Port, L, Timeout) of
          {ok, Socket} ->
  