I'm having major issues with the Socket class in AIR right now. All the
searches I have made result in people who have asked "Why is this happening?"
and NOBODY has answered any of their questions.
Socket progress events stop firing if "too much" data is coming across the
socket, and apparently, what counts as too much data is very very small.
I'm trying to send 14,522 bytes across the socket to Flash and Flash simply
stops accepting data after 2 packets and occasionally reports 2-3 more progress
events of the same size. Like this:
986 / 14522
4380 / 14522
4380 / 14522
4380 / 14522
4380 / 14522
I'm stripping data off the Socket as it comes in and putting it into a ByteArray
buffer, so the data isn't just sitting on the Socket.
protected function onData(event:ProgressEvent):void
{
socket.readBytes(bufferIn, 0, socket.bytesAvailable);
trace(bufferIn.bytesAvailable + " / " + header.length);
}
Wireshark clearly shows all the data is arriving on the socket, but Flash stops
reporting all progress after a few packets.
If I drop the bytes per response down to 892, it works fine. The next step up
is 1037 and that breaks. So, it's looking like 1024 is the maximum size you can
send to the Flash Socket before it breaks.
I'm at my wits end with this. There's nothing but people complaining about this
online and absolutely zero answers or solutions.
Oliver? Anyone from Adobe? Can somebody please shed some light on this issue
that has basically halted our development?
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders