Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
 
 
 
 
 
 

README.md

#AMP AS3

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:

http://amp-protocol.net/

##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( "127.0.0.1", 6000 );
amp.addEventListener( AMPEvent.AMP_CONNECTED, ampConnectedHandler );
amp.connect();

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)

About

AS3 Implementation of AMP (Asynchronous Messaging Protocol) first utilised in the Python Twisted library

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.