SocketJS
Realtime Sockets in Javascript!
The JS-Bridge to Flash' Socket API
This example does not work anymore because I am currently playing with Flash 9 connecting to an unpatched version of unrealircd. That`s why I uninstalled the server which socketjs tries to connect to.
If you want to get the "\0"-pacthed version of unrealircd download it here

With an embeded .swf file (300 byte).
The Flash API is bridged to Javascript using:

  • FS Commands
  • TCallLabel

    Look at the sourcecode of this file to see how it works! Pretty easy!

  • function SocketConnect(host,port){}
  • function SocketSend(data){}
  • function SocketClose(){}
  • function SocketOnInit(){}
  • function SocketOnConnect(success){}
  • function SocketOnData(data){}
  • function SocketOnClose(){}

  • Where to use?
    You might use SocketJS to create multiuser applications.
    Which server should I use?
    You could create one with php`s socket function. Or any other programming language that supports creating socket servers. Make sure you allow the Flash requirement of "\0\n" line endings. There is a nice tutorial avaible.
    Manfred`s Blog   Related Blog Post   Download SocketJS