It seemed natural to code the sending of data to an SSL socket thus:
socket.write (EncodeBase64 (imagedata)) socket.flush ()
where imagedata is a memoryblock filled by a binary read from a file.
However, the file may be sizeable and when today I chanced to do that with a 7Mbyte file, I had a spinning pizza for 63 seconds, during which time my app was entirely unresponsive, even though the code above is in a thread.
In order to get the thread to yield, should I be looking at encoding the data as one statement, then splitting that on the line-ends, and then in a loop, either writing the lines one at a time to the socket or in groups of 100 or so?