I have now submitted a bug report. My findings are as follows
Transmitting large blocks of data over tcp using luasockets (eg ~6k) intermittantly corrupts when received. The client/server receive() function is doing one of two things (randomly)
- It returns an incomplete packet (the beginning is missing, not the end). The receive function is not returning any errors
- It returns a non-table data packet. It is just the number 14.
I made a test program that demonstrates this. The test program pings 6k messages back and forth between a server and client. It will occur randomly (anywhere from 1 ping to a few hundred pings before it happens.)
NOTE: The test MUST be performed across a proper network. Running two simulators on the same computer does NOT produce the problem. I have reproduced using two simulators on different computers, 1 simulator and one device (iPad3) and also 2 devices (iPad4 and iPhone5).
[import]uid: 110197 topic_id: 33837 reply_id: 135296[/import]