Today, I give you a free utility class that handles everything you need to handle in order to establish a connection. Tomorrow, I give you the world a class that make it seem like you are calling functions directly on the server and visa versa.
Download the latest version of the ConnectionEstablisher class here.
Usage example:
Actionscript:
-
// To establish a new connection, do the following:
-
var _server:ConnectionEstablisher = new ConnectionEstablisher("127.0.0.1", 4500);
-
-
// To send data to the server, do the following:
-
var xmlPacket:XML = <car>
-
<year>2007</year>
-
<make>Toyota</make>
-
<model>Baja 1000 FJ Cruiser</model>
-
</car>
-
-
_server.send(xmlPacket);
This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.
