Danushka Menikkumbura wrote:
As far as I can see, this is wrong due to 3 reasons.

1. You can not resize "data" since it is a const.
2. Resizing a string is costly.
3. Copying stuff in to "data" alone is not sufficient as it is necessary to set the content length in the header as well.

Hmmmm, that's too bad. I'd like to avoid creating a buffer and then copying it over ("minimize the movement of data"). Is there a better way to write binary data directly into the message contents without creating a buffer first?

Jonathan

Reply via email to