Refine timeout control; refine rest book examples.

This commit is contained in:
Adam Gu
2018-08-23 17:28:02 +08:00
parent 2e2b45dd43
commit e9096d4e53
16 changed files with 313 additions and 201 deletions
+5
View File
@@ -3,11 +3,16 @@
#include <iosfwd>
#include <string>
#include <vector>
#include "boost/asio/ip/tcp.hpp"
namespace webcc {
// Adjust buffer size according to content length.
// This is to avoid reading too many times.
void AdjustBufferSize(std::size_t content_length, std::vector<char>* buffer);
void PrintEndpoint(std::ostream& ostream,
const boost::asio::ip::tcp::endpoint& endpoint);