Soket sunucusu ve Flash AS3 arasında el sıkışma

0 Cevap java


What's an example of a simple handshake between a php socket server and flash? A test I can run command line would be ideal, since I don't have a server for this experiment.

I'm need a good example that's easy, and something I can run off my laptop without internet:)
Thanks

FLASH MÜŞTERİ

//SOCKET CLIENT IN FLASH AS3
var xmlSoc=new XMLSocket();
xmlSoc.addEventListener(Event.CONNECT, socEventCatch);
xmlSoc.connect("localhost", 1999);
xmlSoc.addEventListener(Event.CLOSE, socEventCatch);
xmlSoc.addEventListener(IOErrorEvent.IO_ERROR, socEventCatch);
xmlSoc.addEventListener(DataEvent.DATA, socEventCatch);
function socEventCatch(Event):void{
trace("Received Data: " + Event.data);
var xml_msg:XML = new XML(Event.data);
//STRING TEST 'HELLO WORLD'
var MYSTRING:*;
MYSTRING =xml_msg.body.MYSTRING;
txt.text = String(MYSTRING);
}

XML MESAJ 'Merhaba Dünya'

<msg>
  <body>
    <MYSTRING>#3: HELLO WORLD</MYSTRING>
  </body>
</msg>

PHP LOKMA VE POLİTİKA DOSYA?

0 Cevap