That's why I threw it into this `if` block instead of how it was done before, so the `concat` happens once.

I can't simply copy the new data buffer into the `responseBuffer` because the code does not not a priori how long the message will be.

Even if I did "get the first chunk, see the size of the whole buffer, allocate that buffer and copy things into it" it would still be doing the same number of `memcpy`s for that message. The question is whether I pay that price incrementally or once the message is ready.

Is there a benchmark of the perf differences between the two approaches anywhere? I'd only go for that more complicated (and possibly error-prone) mechanism if it does have a significant perf improvement over what I'm doing here, but I really don't believe it will.