I'm using a boost array as buffer for the content I get from the async_read of the boost::asio.
After readin开发者_如何学编程g I want to clear/reset the buffer for the next read. Please tell me how can i do this.
You do not need to clean each reading, just use the amount of bytes read
buffer(array, bytes_readed)
In case you still want, you can use the assign method
array.assign(0);
精彩评论