开发者

Clearing boost::array

开发者 https://www.devze.com 2023-02-03 14:16 出处:网络
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

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);

0

精彩评论

暂无评论...
验证码 换一张
取 消