Oh, nice!  Thanks for the info, Peter.

I dug a bit deeper into things, and found several resources, one of which I
believe points out the specific problem that Peter (Fisk) mentioned above,

Near the bottom of http://www.huikuri.com/flash/xml/

*7 E My Server sends out XML but my Flash application never receives it?*
Your XML server must terminate each XML messages with a null (ASCII 0)
otherwise your flash application will hold open a connection until the
session is closed. If you are having problems have a look at some of the
prebuilt flash servers that are known to be working and test with those,
before using your own server. Then you can concentrate on problems in your
flash code or your socket server.


Again, as Peter points out above, binary socket connections are available as
part of Flash 9. I've been playing around with bits and pieces of code, with
some levels of success.  For what it's worth, I've found the following error
catching code found in the ActionScript 3.0 Cookbook quite valuable in this
regard,

if ( socket.connected ) {
   try {
       socket.flush(  );
   }
   catch( error:IOError ) {
       logInstance.write( "socket.flush error\n" + error );
   }
}
else {
   connectToSocketServer(  );
}



On 3/6/07, Peter Saint-Andre <[EMAIL PROTECTED]> wrote:

See also the ActionScript library that Daniel Dura at Adobe created:

http://www.danieldura.com/archive/new-as3-xmpp-library-on-adobe-labs

http://code.google.com/p/as3xmpp/

/psa

Peter Fisk wrote:
> Thanks for your help.
>
> Knowing this, I was able to get the server to respond.
>
> Fortunately, it looks as though the Xiff project is ready to ship a Beta
> release - they seem to use a binary socket connection to avoid the
problem.
> http://www.igniterealtime.org/projects/xiff/
>
> -- Peter Fisk
>
>
>
> On 3/5/07, *Peter Saint-Andre* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Flash doesn't like XML streams and XMPP is streaming XML. A Google
>     search for "Flash+Jabber" or "Flash+XMPP" will probably yield some
>     workarounds...
>
>     /psa
>
>     M. David Peterson wrote:
>      > Hey All,
>      >
>      > Peter Fisk (Cc'd) has developed direct support for XMPP into
Vista
>      > Smalltalk, a .NET and now Flash-based implementation of Smalltalk
>     and
>      > Lisp.  It seems he's run into some problems, however, with
>     getting XMPP
>      > to work in the Flash-based version (see:
>      > http://vistascript.net/vistascript/flex/vst.swf
>     <http://vistascript.net/vistascript/flex/vst.swf> for a working demo
and
>      > visit http://vistasmalltalk.wordpress.com/
>      > <http://vistasmalltalk.wordpress.com/
>     <http://vistasmalltalk.wordpress.com/>> for a running list of
entries
>      > that provide various demo's to help get you started)
>      >
>      > In follow-up to a question I posed to Peter in a recent blog
entry,
>      >
>      > @
>      >
>
http://vistasmalltalk.wordpress.com/2007/02/22/wpfe-10-wont-support-clr/#comment-3676
>      >
>      >     David,
>      >     On opening a socket connection to any Jabber server, I can
>     catch the
>      >     "connection established" event after which it seems to hang.
>     There
>      >     is no problem connecting from Flash to http servers and I can
>      >     connect to Jabber using Exodus with no problem. I added a
>      >     "crossdomain.xml" file to the same directory as the *.swf
file:
>      >
>      >     Any thoughts?
>      >
>      >
>      > I personally don't have enough experience with Flash to be able
>     to know
>      > the answer (or at least the possible answer) to the problem.  Am
>     digging
>      > around a bit to see what I might be able to come up with (I doubt
>     much I
>      > need to express to this list how cool it would be to have this
>      > capability built into a Smalltalk/Lisp interpreter for Flash!
>     ;-)), but
>      > it seemed worth posting this to the dev-list to see if anyone
>     else out
>      > there might be able to lead and guide me, and ultimately, Peter,
>     to the
>      > solution.
>      >
>      > Thanks in advance for any and all help/advice!
>      >
>      > --
>      > /M:D
>      >
>      > M. David Peterson
>      > http://mdavid.name | http://www.oreillynet.com/pub/au/2354
>      > <http://www.oreillynet.com/pub/au/2354
>     <http://www.oreillynet.com/pub/au/2354>> |
http://dev.aol.com/blog/3155
>




--
/M:D

M. David Peterson
http://mdavid.name | http://www.oreillynet.com/pub/au/2354 |
http://dev.aol.com/blog/3155

Reply via email to