XMLSocket - Flash player can't receive data from server

Hi

I used XMLSocket to send and receive data from a local tcp server.

I could successfully connect and send data to the tcp server.

But I can’t receive data from tcp server using both socket.onXML method and socket.onData method.

When I put the tcp server in echo mode and I send data from flash to the server, I could receive the echoed data in both onXML and on Data method.

What might be the reason I am not able to receive data in flash player when data is sent explicitly from tcp server.

TCP server has no issue as I could receive data sent by the server in other client applications.

I am using Adobe Flash CS4 version.

Thank you

regards
Fadi Yoosuf