Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wouterverweirder/AIR-Server
Socket Server library for Adobe AIR
https://github.com/wouterverweirder/AIR-Server
Last synced: about 2 months ago
JSON representation
Socket Server library for Adobe AIR
- Host: GitHub
- URL: https://github.com/wouterverweirder/AIR-Server
- Owner: wouterverweirder
- Created: 2012-09-05T07:50:54.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-03-14T13:52:11.000Z (almost 12 years ago)
- Last Synced: 2024-08-04T05:02:38.859Z (5 months ago)
- Language: ActionScript
- Size: 4.93 MB
- Stars: 47
- Watchers: 13
- Forks: 22
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- awesome-actionscript-sorted - AIR-Server - Socket Server library for Adobe AIR (Networking / Sockets)
README
# AIR Server
AIR Server is a library to create socket servers in Adobe AIR for desktop applications. Some of the features are:
* Multiple clients
* Listen on multiple ports
* Regular text-sockets
* Websockets
* UDP traffic
* P2P traffic
* AMF Encoding over sockets
* Multi-part image data##example code
var server:AIRServer = new AIRServer();
server.addEndPoint(
new SocketEndPoint(
1234,
new AMFSocketClientHandlerFactory()
)
);
server.addEventListener(AIRServerEvent.CLIENT_ADDED,
clientAddedHandler);
server.addEventListener(AIRServerEvent.CLIENT_REMOVED,
clientRemovedHandler);
server.addEventListener(MessageReceivedEvent.MESSAGE_RECEIVED,
messageReceivedHandler);
function clientAddedHandler(event:AIRServerEvent):void
{
trace("Client added: " + event.client.id + "\n");
}
function clientRemovedHandler(event:AIRServerEvent):void
{
trace("Client removed: " + event.client.id + "\n");
}
function messageReceivedHandler(event:MessageReceivedEvent):void
{
trace(" " +
event.message.data + "\n");
}