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:


  1. // To establish a new connection, do the following:
  2. var _server:ConnectionEstablisher = new ConnectionEstablisher("", 4500);
  4. // To send data to the server, do the following:
  5. var xmlPacket:XML = <car>
  6.                         <year>2007</year>
  7.                         <make>Toyota</make>
  8.                         <model>Baja 1000 FJ Cruiser</model>
  9.                     </car>
  11. _server.send(xmlPacket);