How do I implement an XML-RPC server in AS3 (Flash or AIR runtime)?

I am looking for a good XML-RPC server implementation that will be included as part of an existing Flash + AS3 application to receive client event notifications.

An ideal implementation should be well written, documented , robust, and encapsulated to be easily and cleanly wrapped.

EDIT:
I am working on porting my application to Adobe AIR battery life , will this runtime bypass the socket listening limitation? If so, is there any document on this issue?

+2


source to share


2 answers


Well, XML-RPC specifies the use of HTTP as the transport protocol. Since Flash cannot listen on sockets (only connect to them), I don't think it would be possible to create a real XML-RPC server with Flash.

That being said, the client is definitely possible and this 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 is the AS1 / 2 library port.

+3


source


I found this article talking about SocketMonitor .

In the example provided, it uses this piece of code



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

      

It does look like a socket listening server, but I'm afraid it's just a good implementation of the polling mechanism.

0


source







All Articles