On 2025-02-20 18:21, Bob Sneidar via use-livecode wrote:
Bug #24655 submitted.

Looks like an incorrect use / invalid assumption about sockets to me ;)

I've replied to the bug report but it looks like you are assuming that sending X bytes in one send command from the client can be read by one read command in the server...

This isn't unfortunately how things work... TCP/IP packets are only 4k usually and can take a while (relatively) speaking to go from one machine to the other.

The engine on either end insulates the low-level details a bit in that it has a read/write queue (at the system level sockets have a sread/write data buffer but only some small multiple of 4Kb) but you still need to manage data size somehow.

Specifically, tell the server how much data its going to get first, and then have the server read that exact amount of data.

Anyway, hopefully tweaking that will make it work for the much larger file as well as the smaller one :)

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to