sslSocket.write suggested maximum length

If I’m writing a large set of data (think about 4MB with each write) via a sslSocket, is there any reasons (or is it advised) to break it into smaller chunks? I’m not sure what’s going on behind the scenes, and I know Xojo handles a lot of the TCP/IP communications itself. Besides the risk of loss of transmission during longer/larger data sets… is there any issues I’d unexpectedly run into here as far as buffer/string limits, possible corruption [though I know TCP should handle this], etc.?

TCP/IP assures there will NO be lost packets etc
Thats the whole point of TCP/IP

The only other issue is that writing a giant item at one time assures you will use at least 2x that amount of memory
1 in your program and a copy in the Xojo tcp code so even if you alter it while Xojo is sending Xojo still sends what you originally wrote
And there could be a chunk that is at the OS level for its buffer

So potentially 3x with really large writes

But using the events to send and writing chunks (I forget the ideal chunk size - maybe 64K) you can keep that usage down & keep transmission speeds up

[quote=222292:@Norman Palardy]TCP/IP assures there will NO be lost packets etc
Thats the whole point of TCP/IP

The only other issue is that writing a giant item at one time assures you will use at least 2x that amount of memory
1 in your program and a copy in the Xojo tcp code so even if you alter it while Xojo is sending Xojo still sends what you originally wrote
And there could be a chunk that is at the OS level for its buffer

So potentially 3x with really large writes

But using the events to send and writing chunks (I forget the ideal chunk size - maybe 64K) you can keep that usage down & keep transmission speeds up[/quote]

Thank you, sir. Always appreciate your responses. Definitely what I was looking for.