MCPcopy Create free account
hub / github.com/boostorg/beast / init

Method init

include/boost/beast/http/string_body.hpp:97–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95 }
96
97 void
98 init(boost::optional<
99 std::uint64_t> const& length, error_code& ec)
100 {
101 if(length)
102 {
103 if(*length > body_.max_size())
104 {
105 BOOST_BEAST_ASSIGN_EC(ec, error::buffer_overflow);
106 return;
107 }
108 body_.reserve(beast::detail::clamp(*length));
109 }
110 ec = {};
111 }
112
113 template<class ConstBufferSequence>
114 std::size_t

Callers

nothing calls this directly

Calls 2

clampFunction · 0.50
max_sizeMethod · 0.45

Tested by

no test coverage detected