I have a question about tcp data streams in c++. I understand that since a 32-bit integer is used to count the number of bytes sent in the stream there must be a limit of sending 2^32 bytes (4 GB) per stream, or am I wrong?
Is this a problem one must consider when using e.g. boost::asio or is the implementation managing this itself. I'm writing an application which will stream data of sizes possible lager than 4GB so I started to thinking if I should split the data into some several streams if it's size exceeds 4GB. Note, this is not for performance.
The TCP protocol itself does contain an integer in order to count the number of bits sent, from what I understand that limits the underlying TCP stream itself from sending more data than 4GB. So I wonder if the implementation of ASIO has solved this issue behind the scenes or if you should keep track of it yourself.
The data isn't stored in memory for very long, so not being able to address it in memory isn't a problem. The data is also "generated" in small chunks so that's neither a problem for the sender.