[standards-jig] Flash support in the server (was: JNG Ramblings.)

Ben Schumacher ben at blahr.com
Fri Aug 9 20:09:06 UTC 2002


On Fri, 9 Aug 2002, Matthias Wimmer wrote:
> But you have to implement it first. On Wednesday I visited a friend that
> is a Flash programmer. He wanted me to show him how to use Jabber
> because I wan't to use Jabber for some projects. That was cool, we had
> written a Flash Jabber client with presences, roster and all what you
> have in a basic client within less then one your. We could just use the
> XMLSocket class that is a standard part of Flash. - If we would had to
> implement the framing first, it would have been impossible to get a
> working client that fast.
>
> <OT>
> What is the Flash support in the Jabber server for? We havn't needed
> something special.
> </OT>

Matthias-

Actually, you did, but you were probably just lucky and got to take
advantage of the transparent Flash support that is in the open source
server code. Basically, its like this, Flash's XMLSocket class won't let
you send XML with open tags (so no <stream:stream>) without some hacking.
In addition, it tags a NULL onto the end if every piece of XML it sends.
Obviously, the protocol doesn't support a closed tag at the beginning of a
streamed document, and (IIRC) expat gets upset with that NULL character
when parsing XML (and I think it would disconnect the client).

The open source code has some logic built into it where it detects the
extra NULL character and the closed <stream:stream> header, and assumes
you are using Flash. For the rest of the conversation, it strips the NULL
for you.

The Flash support added by JINC for this purpose is more explict. Its
detailed by Jer in the 1.4.2 release documents.

Cheers,

bs.




More information about the Standards mailing list