anchor.diff:  -behaviour(thrift_transport).
   
   %% API
  --export([new/2, set_http_options/2]).
  +-export([new/2, new/3]).
   
   %% gen_server callbacks
   -export([init/1,
  
positive.code:                          path, % string()
                           read_buffer, % iolist()
                           write_buffer, % iolist()
                           http_options
                          }).
  
  %%====================================================================
  %% API
  %%====================================================================
  %%--------------------------------------------------------------------
  %% Function: new() -> {ok,Pid} | ignore | {error,Error}
  %% Description: Starts the server
  %%--------------------------------------------------------------------
  new(Host, Path) ->
      case gen_server:start_link(?MODULE, {Host, Path}, []) of
          {ok, Pid} ->
              thrift_transport:new(?MODULE, Pid);
          Else ->
              Else
      end.
  
  %%--------------------------------------------------------------------
  %% Function: set_http_options() -> ok | {error,Error}
  %% Description: Set HTTP options
  %%--------------------------------------------------------------------
  set_http_options(Transport, HTTPOptions) ->
      gen_server:call(Transport, {set_http_options, HTTPOptions}).
  
  %%--------------------------------------------------------------------
  %% Function: write(Transport, Data) -> ok
  
negative.code:         _ ->
              {reply, {error, 'EOF'}, State}
      end;
  
  handle_call(flush, _From, State) ->
      {Response, State1} = do_flush(State),
  