0 Replies Latest reply on Oct 9, 2009 3:26 AM by prajaktakenjale

    problem using XMLSocket. Sending data but not receiving Data

    prajaktakenjale

      Hi,

      I am using CS4 trial version. i am trying to use XMLSocket to talk to external world. I have written a server program in VC. Server creates a socket and does all other operations required for communication. In Flas CS4 I am using the sample program given. Which is as follows

       

      var theSocket:XMLSocket = new XMLSocket();

      theSocket.connect("127.0.0.1",55555)

       

      theSocket.onConnect = function(myStatus)

      {

      if(myStatus)

      {

      conn_txt.txt = "Connection Successful";

      }

      else

      {

      conn_txt.txt = "Connection Failure";

      }

      };

       

      function sendData()

      {

      var myXML:XML = new XML();

      var mySend = myXML.createElement("the node");

      mySend.attributes.myData = "someData";

      myXML.appendChild(mySend);

      theSocket.send(myXML);

      };

      // button sends data
      sendButton.onRelease = function()
      {
      sendData();
      };
      theSocket.onData = function(msg:String):Void
      {
      trace(msg);
      };

       

      the program is able to send data to the server but not able to receive data from server.

      in server program it is showing that data is sent successfully.

       

      Are there more settings required?