Hi,
I am new to AS. This is the code i wrote in php in server side,
while(true)
{
echo $socketInput=socket_read($comSocket, 1024);
$socketOutput = strtoupper($socketInput);
socket_write($comSocket,$socketOutput);
echo "\
";
sleep(1);
}
in flash,
sock = new XMLSocket();
sock.connect(“127.0.0.1”, 9999);
sock.send(“hello \0”);
sock.onData = function(data) {
trace(data);
}
sock.onClose = function() {
trace(“ended”);
}
I am getting “HELLO” only once. May be I am missing a while loop here, Can someone tell me what’s wrong with the above code.
Thanks