JabberD 2.0 Server Error within <flash:stream> Protocol
DIGG IT!
1
Comments
Published
Thursday, January 08, 2004
at
10:52 AM
.
There is an error in the 2.0+ jabberd server release for support for
XMLSocket object within the Flash Player is a light API for accessing a raw socket on the client machine. When you send data to mysocket.send('send this'), the data is pushed into the socket and is delimited with a null byte. During heavy use or low bandwidth conditions, Flash buffers the messages pushed through the socket if the socket is sending a message. Depending on the server-side socket implementation, the server may receive a block of messages or each individual message. Within Jabberd, if the server receives a block of messages under adverse network conditions, the server will fail to parse out the null delimiter thus crashing the XML parser leading to a disconnected Flash client. The problem is made worse in that JabberD log files display a null byte as space character in ASCII so they are very easy to miss.
What you will see happen from the client is that Jabber will pass an invalid XML error message then close the connection by sending a
You send this:
mysocket.send('<presense/>')
mysocket.send('<iq/>')
The server sees this:
<presense/>\0<iq/>
\0 if not removed will cause the server to disconnect the Flash client.
Not fun. :(
I have send emails to the JabberD team and the error has been confirmed. When I find out about a patch I will post the info. This is most likely the main reason we have seen so few successful Flash Jabber projects. Hopefully this will change things as JabberD simply rocks as a server!
Cheers,
Ted ;)

I have the same problem with the Openfire Server. Do you think that it's a problem with the server?
Cheers,
Diego.