Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ascorbic/socket-io-actionscript
Socket.IO Actionscript 3 client
https://github.com/ascorbic/socket-io-actionscript
Last synced: 22 days ago
JSON representation
Socket.IO Actionscript 3 client
- Host: GitHub
- URL: https://github.com/ascorbic/socket-io-actionscript
- Owner: ascorbic
- Created: 2010-12-02T10:50:51.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2010-12-02T10:55:38.000Z (almost 14 years ago)
- Last Synced: 2024-10-06T10:33:40.546Z (about 1 month ago)
- Language: ActionScript
- Homepage:
- Size: 327 KB
- Stars: 35
- Watchers: 6
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-actionscript-sorted - socket-io-actionscript - Socket.IO Actionscript 3 client (Networking / Sockets)
README
socket.io Actionscript client
============================
#### By Matt KaneThis is a client for [socket.io](https://github.com/LearnBoost/Socket.IO/) implemented in Actionscript 3. It allows you to connect to the socket server from your Adobe AIR/Flex application. I've tested it in AIR but it should probably work in regular Flex, subject to crossdomain policies.
### Usage
I've tried to follow the same API as the socket.io javascript client. This is a simple example of connecting to a socket.socket = new SocketIo("127.0.0.1", {port: 8080});
socket.addEventListener(IoDataEvent.DATA, function(e:IoDataEvent):void {
trace(e.messageData);
});
socket.connect();
socket.send("Hi!");
For a full example, look at Example.mxml, which is a Flex/AIR port of the socket.io chat demo. You'll need to be running the chat demo server for this to work. See the main socket.io project for details of this.Compile and run it like so:
amxmlc Example.mxml
adl example.xml
### Requirements
Obviously, you'll need the Flex and/or AIR SDK. You also need a couple of libraries.+ [as3corelib](https://github.com/mikechambers/as3corelib)
+ [as3crypto](http://code.google.com/p/as3crypto/)Install these either as compiled .swcs in your flex library folder, or as source in this folder.
### Bugs and contributions
If you have a patch, fork the Github repo and send me a pull request. Submit bug reports on GitHub, please.### Credits
By [Matt Kane](https://github.com/ascorbic)
### License
(The MIT License)
Copyright (c) 2010 [CLEVR Ltd](http://www.clevr.ltd.uk/)
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.Includes code from [web-socket-js](https://github.com/gimite/web-socket-js/) Copyright (c) Hiroshi Ichikawa
Also includes code derived from [socket.io](https://github.com/LearnBoost/Socket.IO/) Copyright (c) 2010 LearnBoost