anchor.diff:      Host = proplists:get_value(host, Args, <<"localhost">>),
       Port = proplists:get_value(port, Args, 5280),
       Path = proplists:get_value(path, Args, <<"/http-bind">>),
  +    Wait = proplists:get_value(bosh_wait, Args, ?DEFAULT_WAIT),
       HostStr = binary_to_list(Host),
       {MS, S, MMS} = now(),
       InitRid = MS * 1000000 * 1000000 + S * 1000000 + MMS,
  
positive.code:                 url = {HostStr, Port, binary_to_list(Path)},
                  parser = Parser,
                  rid = InitRid,
                  keepalive = proplists:get_value(keepalive, Args, true)}}.
  
  handle_call(get_transport, _From, State) ->
      {reply, transport(State), State};
  
negative.code:                compress = false,
                 rcv_pid = self()}.
  
  wrap_elem(#xmlstreamstart{attrs = Attrs},
            #state{rid = Rid, sid = Sid, wait = Wait}) ->
      Version = proplists:get_value(<<"version">>, Attrs, <<"1.0">>),
      Lang = proplists:get_value(<<"xml:lang">>, Attrs, <<"en">>),
      To = proplists:get_value(<<"to">>, Attrs, <<"localhost">>),
      session_creation_body(Wait, Version, Lang, Rid, To, Sid);
  wrap_elem(["</", <<"stream:stream">>, ">"], #state{sid=Sid, rid=Rid}) ->
      session_termination_body(Rid, Sid);
  wrap_elem(Element, #state{sid = Sid, rid=Rid}) ->
  