How to clear recveive buffer after read when buffer is reused.
Open
Design
- Dominant language
- C++
- Stars
- 4.8k
- Forks
- 694
- Avg merge
- 12h 48m
- Merged PRs (30d)
- 1
Description
I am using REST protocol with BEAST https. I try to reuse the beast::buffer::flat_buffer.
But I found each time I send a request and read from http::response. the buffer didn't clear the result from previous request.
For example, first time the server send back "[]", the second time I read is "[][next time result]".
I called response->clear() and buff->consume(0); it does'nt work.
How to clear the buffer after I have processed the result and prepare the buffer for next time read?
Contributor guide
Assessment
This issue has not been assessed yet.