2 Replies Latest reply on Feb 7, 2008 9:23 AM by Brandon Ellis

    Trouble displaying data from XML socket connection

      I'm exploring the way that Flex applications interact with a simple Java socket server, and I've run into a difficulty getting my client [a Flex application] to display incoming data in a timely manner.

      Here's what I've figured out so far:

      1. My client establishes the XML socket connection successfully.
      2. It sends the data successfully using send().
      3. The Java socket server sends a response (an "echo") in a very timely manner (instantaneously, according to the message I receive in my Java socket server's window).
      4. The client probably receives the response in a very timely manner (instantaneously).

      The trouble, though, is that the response isn't displayed on my screen until next time I send data. I've set up a text box for incoming data and a text box for outgoing data, each of which is updated using something like the following:

      textReceived.text += "\nData In: " + thisData.items[0].item;

      When I click a button to send a line of data to the server, the Data Out window updates immediately. But the Data In window doesn't update until the next message is sent -- and I'm not sure if this is because the data isn't being received yet or simply because the data isn't being displayed yet.

      Any ideas?