Flash XMLSocket

Martin Atkins mart at degeneration.co.uk
Fri Dec 1 08:08:04 UTC 2006


Brad Fitzpatrick wrote:
> 
> On Thu, 30 Nov 2006, oliver oli wrote:
> 
>> Hello,
>>
>> is anyone using DJabberd with a Flash client and XMLSocket? (\0
>> terminated). Do you use some proxy server? I guess there is no support
>> for XMLSocket-XMPP in DJabberd.
>>
>> I know that there is a plain Socket object in Flash 9, unfortunatly not
>> everyone has Flash 9 and FlashLite supports XMLSocket only...
>>
>>
> What's the quick summary of this protocol, for those of us that don't know
> Flash?  Any pointers?
> 

According to the page at this huge URL:
<http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary860.html>

it's a TCP connection where you send whole XML documents delimited by nuls.

Even without DJabberd support it probably wouldn't be too hard to write 
a little proxy in the language of your choice which would have Flash 
XMLSocket on one end and an XMPP stream on the other.

Could specify that the first "packet" contains the stream element (with 
appropriate namespace declarations) and the c2s handshake (or whatever) 
and subsequent packets contain bare stanzas. The advantage of subsequent 
packets using bare stanzas is that you don't have to worry too much 
about the client introducing crazy new namespaces when the <stream> 
element has been and gone: you can just massage the prefixes and pass 
everything over otherwise verbatim.

Probably wouldn't be too hard to make a DJabberd connection plugin that 
could do this, but a proxy such as this would be useful for users of 
other Jabber servers too.



More information about the Djabberd mailing list