views:

690

answers:

3

I'm looking for a good XML-RPC server implementation to be included as part of an existing Flash+AS3 application in order to be notified on events by a client.

The ideal implementation should be well written, documented, reliable and encapsulated in order to be easily and cleanly wrapped.

EDIT:
I'm working on porting the app on Adobe AIR runtime, will this execution environment bypass the listening socket limitation? If yes, any doc about this issue?

+3  A: 

Well, XML-RPC specifies using HTTP as transport protocol. Since Flash can not listen on sockets (only connect to them) I do not believe it would be directly possible to create an actual XML-RPC server with Flash.

That being said, a client is definately possible, and has been done a couple of times:

http://code.google.com/p/as3-rpclib

http://danielmclaren.net/2007/08/03/xmlrpc-for-actionscript-30-free-library

The second one is a port of an AS1/2 library.

Branden Hall
Thanks for the info regarding the impossibility of socket listening in flash (can I have a link to some official doc for this argument?). + 1 for this. Regarding the client I thank you for the links, but my app already implements xml-rpc client successfully. Thanks again
AlberT
All of the networking support that is in Flash is part of the flash.net package. Here's a link to the docs for the most recent version of that package: http://livedocs.adobe.com/flex/gumbo/langref/flash/net/package-detail.html
Branden Hall
Also, I have heard word that the next version of AIR may be able to listen on ports (not sure if it's TCP, UDP or both though) but it is not currently available as of AIR 1.5.2.
Branden Hall
A: 

Can anyone confirm Air 2 will be able to create Listening sockets?

Wyatt
Is this a confirmation of the inability of AIR 1.x to do this?
AlberT
A: 

I found this article talking about a SocketMonitor framework.

In the example given it uses this piece of code

var myIstance = 
   Components.classes["@mozilla.org/network/server-socket;1"]
   .createInstance(Components.interfaces.nsIServerSocket);

That really resemble to a listening socket server, but I'm afraid it is only a good implementation of a poll mechanism.

AlberT