anchor.diff:    when Error == tcp_error; Error == ssl_error ->
       {stop, {sock_error, Reason}, State};
   
  -handle_info(timeout, #state{handler = Handler} = State) ->
  -    ?MODULE:Handler(timeout, State);
  -
   handle_info({_, Sock, Data2}, #state{data = Data, sock = Sock} = State) ->
  -    loop(State#state{data = <<Data/binary, Data2/binary>>}, infinity).
  -
  -loop(#state{data = Data, handler = Handler} = State, Timeout) ->
  +    loop(State#state{data = <<Data/binary, Data2/binary>>}).
  +
  +loop(#state{data = Data, handler = Handler} = State) ->
       case pgsql_wire:decode_message(Data) of
           {Message, Tail} ->
               case ?MODULE:Handler(Message, State#state{data = Tail}) of
                   {noreply, State2} ->
  -                    loop(State2, infinity);
  -                {noreply, State2, Timeout2} ->
  -                    loop(State2, Timeout2);
  +                    loop(State2);
                   R = {stop, _Reason2, _State2} ->
                       R
               end;
           _ ->
  -            {noreply, State, Timeout}
  +            {noreply, State}
       end.
   
   terminate(_Reason, _State) ->
  
positive.code:                 queue = queue:new(),
                  async,
                  ready,
                  timeout = 5000,
                  parameters = [],
                  txstatus}).
  
  
negative.code:     gen_server:start_link(?MODULE, [], []).
  
  connect(C, Host, Username, Password, Opts) ->
      gen_server:cast(C, {connect, Host, Username, Password, Opts}).
  
  close(C) when is_pid(C) ->
      catch gen_server:cast(C, stop),
      ok.
  
  get_parameter(C, Name) ->
      gen_server:call(C, {get_parameter, to_binary(Name)}).
  
  squery(C, Sql) ->
      gen_server:cast(C, {squery, Sql}).
  
  equery(C, Statement, Parameters) ->
      gen_server:cast(C, {equery, Statement, Parameters}).
  
  parse(C, Name, Sql, Types) ->
      gen_server:cast(C, {parse, Name, Sql, Types}).
  
  bind(C, Statement, PortalName, Parameters) ->
      gen_server:cast(C, {bind, Statement, PortalName, Parameters}).
  
  execute(C, Statement, PortalName, MaxRows) ->
      gen_server:cast(C, {execute, Statement, PortalName, MaxRows}).
  
  describe(C, Type, Name) ->
      gen_server:cast(C, {describe, Type, Name}).
  
  close(C, Type, Name) ->
      gen_server:cast(C, {close, Type, Name}).
  
  sync(C) ->
      gen_server:cast(C, sync).
  
  cancel(S) ->
      gen_server:cast(S, cancel).
  