anchor.diff:      {noreply,
        State2#state{handler = auth,
                     queue = queue:in(From, Queue),
  -                  async = Async},
  -     Timeout};
  +                  async = Async}};
   
   handle_call(stop, From, #state{queue = Queue} = State) ->
       %% TODO flush queue
       {stop, normal, ok, State};
   
   handle_call({parse, Name, Sql, Types}, From, State) ->
  -    #state{timeout = Timeout, queue = Queue} = State,
  +    #state{queue = Queue} = State,
       Bin = pgsql_wire:encode_types(Types),
       send(State, $P, [Name, 0, Sql, 0, Bin]),
       send(State, $D, [$S, Name, 0]),
       send(State, $H, []),
       S = #statement{name = Name},
       State2 = State#state{queue = queue:in(From, Queue)},
  -    {noreply, State2, Timeout}.
  +    {noreply, State2}.
   
   handle_cast(cancel, State = #state{backend = {Pid, Key}}) ->
       {ok, {Addr, Port}} = inet:peername(State#state.sock),
  
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).
  