[jdev] Flash vs Jabber

** sdk at disktree.net
Tue Jan 16 17:15:19 CST 2007

..no need to switch to ajax/java/anything.
for outgoing data i simply extend flash.net.Socket and add this function:

         * Sends byte string to server.
         * @param output String to send
        public function send( output:String ):void
            writeUTFBytes( output );

.. i've also added a outgoing packet cache, which sends a xmpp-packet 
every ms (via flash.utils.Timer),
otherwise the outgoing stream seems to get confused.
i didnt find another solution yet. but this works fine.

..incoming data:

         *  Socket connection data incoming handler
        private function sockProgressHandler( event:ProgressEvent ):void
            var s:String = sock.readUTFBytes( sock.bytesAvailable );

            _reader.parsePacket( s );

Sander Devrieze schrieb:
> ** schreef:
>> i am also developing a xmpp as3 lib.
>> a out of date api doc is here:
>> http://disktree.net/flabber/doc/
>> i will release the source code, as soon as i find time to cleanup 
>> everything a bit (which seems to be anytime in 2099.unk )
> Someone with a question about your lib:
> http://ejabberd.jabber.ru/node/1297

More information about the JDev mailing list