In my application, I request a file from an HTTP server in order to parse a certain type of information. The problem is, since I have a char buffer of 512 indices, my application sometimes receives only a part of the string I need to parse, while I need the WHOLE string.
The worst thing is that the server does not always split the string that I need to parse in the same place. Sometimes it splits it in half, sometimes a quarter, etc.
This disables me from predicting the splitting of the string.
My current solution is very, very, very nasty. I have a char buffer of 80k indices, that way, the server won't have the need to split the body into parts and I can receive the whole string I need to parse. This makes my application very slow and a HUGE memory occupant.
Any solutions that cross your mind?