I added a comment to clarify; on the read side, the buffer has both a write head (where data read from the network is added) and a read head (where the class user is reading the data).  I will soon replace these buffers with a circular buffer (where the buffer enlarges if the write head reaches the read head), but temporarily, I'm just using a standard Qt buffer and reallocating it when there's a sufficient amount of consumed data.