0 Replies Latest reply: Apr 1, 2009 6:50 PM by sneakyimp RSS

    socket ProgressEvent stops firing after 130KB?

    sneakyimp Community Member
      I have a pretty elaborate class that extends Socket and performs some serialization and data protocol stuff. It works pretty well when I send small messages. However, when I send anything over about 132KB at once, the SOCKET_DATA progress events stop firing -- or at least the function I've got listening for them does. My class is called RPCSocket and I assign the socketDataHandler function like this in my constructor:
      addEventListener(ProgressEvent.SOCKET_DATA, socketDataHandler);

      My socketDataHandler function (with lots of comments) is attached. Is there some limit to how much data can be sent over a socket at once? Is there something wrong with my code? Here's the trace output:

      socketdatahandler
      bytesAvail:4380
      buffer length:0
      reading bytes into buffer for concat
      buffer length after concat:4380
      buffer state:0
      BUFFER state is ready
      and we got enough bytes: 4380
      setting mesg length to 500040
      buffer state set to 1
      trimming 4 bytes off buffer
      buffer length:4376
      the big check
      end of message peel loop
      socket data handler end
      socketdatahandler
      bytesAvail:8760
      buffer length:4376
      reading bytes into buffer for concat
      buffer length after concat:13136
      buffer state:1
      the big check
      end of message peel loop
      socket data handler end
      socketdatahandler
      bytesAvail:64240
      buffer length:13136
      reading bytes into buffer for concat
      buffer length after concat:77376
      buffer state:1
      the big check
      end of message peel loop
      socket data handler end
      socketdatahandler
      bytesAvail:54020
      buffer length:77376
      reading bytes into buffer for concat
      buffer length after concat:131396
      buffer state:1
      the big check
      end of message peel loop
      socket data handler end