jorgedbucaran
02-29-2008, 02:49 PM
Hello all,
I am building a small Simple Server in Java (taken from the Adobe Labs documentation)
I am debugging it, and I must say I am pretty much satisfied with the dynamics. OK, so first thing, I am able to send data to the server, this I can check from the NetBeans IDE console window because it prints out the received message.
However I am unable to receive data back, in other words the DataEvent.DATA event never gets called even though I do write to the socket from Java.
In short, it is simply never called when debugging, it does not work either when I compile the movie and run it with Flash Player 9 from my computer or from an internet browser, however in the last case, when running from my computer with Flash Player 9 and debugging from NetBeans the data that is actually sent to the Java application is
"<policy-file-request/>" + the null character. (great I got that ;D)
And finally gives this error:
Error: Error #2002: Operation attempted on invalid socket.
at flash.net::XMLSocket/send()
at FlashSocketsDemo_fla::MainTimeline/closeButton_Click()
So first I need to understand what is going on and finally then how to solve it so I can debug my application.
Enlight me please,
J
I am building a small Simple Server in Java (taken from the Adobe Labs documentation)
I am debugging it, and I must say I am pretty much satisfied with the dynamics. OK, so first thing, I am able to send data to the server, this I can check from the NetBeans IDE console window because it prints out the received message.
However I am unable to receive data back, in other words the DataEvent.DATA event never gets called even though I do write to the socket from Java.
In short, it is simply never called when debugging, it does not work either when I compile the movie and run it with Flash Player 9 from my computer or from an internet browser, however in the last case, when running from my computer with Flash Player 9 and debugging from NetBeans the data that is actually sent to the Java application is
"<policy-file-request/>" + the null character. (great I got that ;D)
And finally gives this error:
Error: Error #2002: Operation attempted on invalid socket.
at flash.net::XMLSocket/send()
at FlashSocketsDemo_fla::MainTimeline/closeButton_Click()
So first I need to understand what is going on and finally then how to solve it so I can debug my application.
Enlight me please,
J