0 Replies Latest reply on Feb 19, 2008 11:04 AM by Bilboon

    flash.net.socket : lost messages

    Bilboon
      Hi,

      Using class flash.net.socket connected to a python stackless TCP
      server, i'm experiencing the following problem: when tcp server send
      multiple messages to the client, the first message is handle correctly
      but the following are lost. I have no trace of the lost messages on
      the client.

      The network traffic is Ok, all messages are sent to the client. If i
      introduce a timer on the server side, sending 1 message/second, they
      are handled correctly by the client.

      The client code is standard :

      ------------------------------------------------

      class CustomSocket extends Socket {

      public function CustomSocket(host:String = null, port:uint = 0) {
      super(host, port);
      addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);
      }

      private function socketDataHandler(event:ProgressEvent):void {
      trace("socketDataHandler: " + event);
      trace(readUTFBytes(bytesAvailable));
      }
      }

      ----------------------------------------------

      Did somebody experienced the same problem or have sample of robust client using flash's socket?

      Thx.