Shouldn't you wait for the connected event Event.CONNECT before you send something?
Thanks for your reply.
This is actually a cut down version of a larger program (which does have the connect listener), but I have chooped it down to try to highlight the problem.
As the connection is known to occur (I get the connected ready and logged in response) I didn't include this in the test code shown in this question.
1 person found this helpful
Can you see log messages on the server? if not is difficult to narrow your issue. I don't see any other way than to debug on the server. See what your client is sending on the socket and how the server responds. If you cannot do that this beats me...
Thanks (again) for following this.
Nothing of interest in the log files (just the logged in messages), however I did a tcpdump and all OK (as expected) via telnet, but only the same responses as the trace mesages, when I run the program.
So, the socket is being read correctly, simply that I am not getting the responses I expected?
It might be a timing issue, but I did put (as a quicky) a large for loop in the sendString function, but this had no effect:-(
But if you compare the TCP packets which the server sends back to telnet, and the ones it sends to flex are they the same?
When I run telnet, the console responses are the same as the tcpdump messages.
When I run the program, the messages from tcpdump match the messages in my trace statements.
The messages from telnet and running the program are different:-)
I can only assume (at the moment) that I am sending multiple messages too quickly(?), but I did a quick and dirty big "for loop" to slow down the sending of subsequent messages, but with no resulting change in the programs behaviour.
So, still thinking about the problem - unfortunately.
I know flash player is doing message throttling for LocalConnection, however not aware if is doing any for Sockets. Unfortunately I don't have ay idea here :(...