T
T
Tesla4o2019-03-07 10:05:30
JSON
Tesla4o, 2019-03-07 10:05:30

How to read large responses in Boost::asio::read?

I don't understand how to count a very large response with a GET request from boost::asio. I do char buffer[1024] the answer does not fit. as a result takes off exception. and if I make a buffer 4096, then the application freezes. in the while loop, the title is read first, I look for Content-Length and read the length. the response comes in the form of a header and then a Json body. how to make it read sooo big answer?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question