anchor.diff:      Transport = gen_server:call(Pid, get_transport),
       {ok, Transport}.
   
  -send(#client{socket = Socket, ssl = true}, Elem) ->
  -    ssl:send(Socket, exml:to_iolist(Elem));
  -send(#client{rcv_pid=Pid, compress = {zlib, {_,Zout}}}, Elem) ->
  -    gen_server:cast(Pid, {send_compressed, Zout, Elem});
  -send(#client{socket = Socket}, Elem) ->
  -    gen_tcp:send(Socket, exml:to_iolist(Elem)).
  +send(#client{rcv_pid = Pid} = Client, Elem) ->
  +    gen_server:cast(Pid, {send, Client, Elem}).
   
   is_connected(#client{rcv_pid = Pid}) ->
       erlang:is_process_alive(Pid).
  
positive.code:                                  parser = Parser,
                                   socket = Socket,
                                   compress = Compress,
                                   event_client = EventClient} = State) ->
      {ok, NewParser, Stanzas} =
          case Compress of
              false ->
  
negative.code:         {false, false} ->
              gen_tcp:send(Socket, exml:to_iolist(StreamEnd))
      end.
  
  do_connect(Address, Port, Opts, OnConnectFun) ->
      TimeB = os:timestamp(),
      Reply = gen_tcp:connect(Address, Port, Opts),
      TimeA = os:timestamp(),
      ConnectionTime = timer:now_diff(TimeA, TimeB),
      case Reply of
          {ok, Socket} ->
              OnConnectFun({ok, Socket, ConnectionTime});
          {error, _} ->
              OnConnectFun(Reply)
      end,
      Reply.
  