Mattheis, Erik (MIN-WSW) skriver:
> On 2/16/12 4:20 PM, "Henrik Andersson" <[email protected]> wrote:
> It is highly possible that multiple writes was stuffed into one read,
> even if you don't flush between the writes.
> 
> The three "left over" bytes could be the first three bytes of the length
> of the next object.
> 
> I left out some of the code in which I'm trying to account for receiving the 
> object during separate ProgressEvents - my my ProgressEvent handler:
> 
> _socket.readBytes(_socketData);
> if (_socketData.length < _messageLength) {
>   // more data coming, exit the event handler and wait for the next 
> ProgressEvent
>   break;

Is it possible that _messageLength is not correctly initialized at this
point? I suspect that it may contain a stale value. The correct value
when waiting for the length is 4.

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to