ah - a couple things to note / try:
a) if you send the string representation of the float, it’s alot more info then the float itself, for example:
“3.91214341” = 10 bytes, while the float is only 4 bytes.
please correct me if I am wrong (because I’ve only done this flash - C++ stuff once), as I remember, the best way to do it was to base64 encode the bytes of the float, because flash has a silly system of using a “/0” character to represent the last byte (so you can’t send “raw” data , you will need to convert it to something like text, thus base64). Then on the flash end, you decode the data. I dont’ know how well that would work with variable sized packets, but I typically send the same amount of data per frame (and pad with zeros if there are less points then the max) so for me it worked well. I have done this before for float arrays c++ -> flash. I hear that in actionscript 3, you can avoid the xml socket (and thus the /0 to end the data) so that it’s easier to send raw data, and over udp which is even faster.
anyway, base64 = save you alot of space in the packet.
b) I haven’t looked at your code yet, but it occurs to me that you should employ a model of call and response for sending data - ie, flash says to c++, “I am ready for data” and c++ says, “ok, here’s the data”. If not, you may be operating a time scale that is inappropriate, like flash is processing the data way to slow for c++, and then backlog of unprocessed packets gets to be too much. This is a big cause of things like latency (for example, receiving serial data that get further and further away from being the current data). I strongly recommend call and response for most models of communication, such as network or serial, because devices operate at different frequencies and this keeps everyone in sink.
c) you should print the packet size when it gets slow so you know how big it is bytes. I am curious.
c) you should try c++ -> c++ to see if this is a flash thing, or if you are just maxing a packet size that might be too massive for the tcp transmision and thus it could be solved by altering tcp settings, etc.
hope that helps!