[ejabberd] Re: xml_stream:send_text

Joel Reymont joelr at well.com
Fri Apr 28 18:56:11 MSD 2006

I'm getting a hang of answering my own questions :-).

Jabberlang 0.2 loads the expat driver on its own and assumes that XML  
stream is a pid. In the latest release of ejabberd the xml_stream  
module takes care of expat and returns a record instead of a pid from  

The fix is to change receiver/2 below to work with a structure and  
update the corresponding portion of ready_to_connect/3.


On Apr 28, 2006, at 3:45 PM, Joel Reymont wrote:

> Folks,
> It looks like send_text has left the xml_stream building. How am I  
> supposed to redo this bit of code from xmpp.erl in Jabberlang?
> receiver(Socket, Pid) ->
>     case gen_tcp:recv(Socket, 0) of
> 	{ok, Data} ->
> 	    xml_stream:send_text(Pid, binary_to_list(Data)),
> 	    receiver(Socket, Pid);
> 	{error, Reason} ->
> 	    ok %% End receiver TODO: End other process
>     end.
> 	Thanks, Joel
> --
> http://wagerlabs.com/

More information about the ejabberd mailing list