I have a c++ client that sends a large string (Minimum size 10 KB) to a Java server application after a certain interval. During that interval the c++ application accumulates huge bytes of data and sends it completely to server.The server also receives it at one shot.
I want to keep the size of the string variable less than string::max_size at all times. Once the string's size approaches the limit I will then send that string to server and clear the string and only then move on collecting the remaining data.
and if the string can hold the complete data , will the entire data be transferred from client to server without fail.(Assuming no connection reset or any other such problem arises.)
Can somebody tell me If this is the way to proceed?