Encoding Arrays with File Paths

Mark Waddingham mark at livecode.com
Fri Feb 21 00:28:40 EST 2025


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 ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things



More information about the use-livecode mailing list