The size of the line is limited only by the amount of memory available to the program, this is more of a limitation of the operating system than a limit of C ++. C ++ / C lines end in zero, so string procedures will successfully process extremely long lines until they find zero.
In Win32, the maximum available memory for data is usually around 2 gigs.
You can read arbitrarily large amounts of data from a socket, but you should have some way to distinguish between the data you read. There should be an end to the record marker or the length associated with the records you are reading, and use them to analyze the records. Are you sure you want to read the data in a string? What happens if you do not have enough free memory to store data in RAM? I suspect there is a more efficient way to process this data, but I do not know enough about the problem.
Bearned
source share