AS3 Implementation of AMP (Asynchronous Messaging Protocol) first utilised in the Python Twisted library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


AMP AS3 is a pure ActionScript 3 implementation of AMP (Asynchronous Messaging Protocol) a lightweight typed messaging protocol for asynchronouse 2 way communication between server and client.

More info on AMP can be found at:

##Simple Example

Create a command

class Hello extends AmpCommand{
	public function Hello(){
		this.args = { message : AMP_STRING };
		this.response = { success : AMP_BOOLEAN };

Create the AMP server and add a connected handler, for the socket.

amp = new AMP( "", 6000 );
amp.addEventListener( AMPEvent.AMP_CONNECTED, ampConnectedHandler );

Call the remote server with the Command

amp.callRemote( Hello, { message : "Hello World" } );

Respond to the remote server calling the command

amp.setResponder( Hello, helloHandler );		

function helloHandler( object : Object ){
	trace("Message Recieved:", object.message );

##Future Changes

  • Strict object typing and AMP compliant error messaging
  • Implement AMP 'Box Object'
  • Pure AS3 server implementation (create server open socket etc)