...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Type-erased buffers generator for
http::message
.
Defined in header <boost/beast/http/message_generator.hpp>
class message_generator
Name |
Description |
---|---|
Name |
Description |
---|---|
|
|
|
|
Returns the result of |
|
message_generator [constructor] |
|
|
Implements the BuffersGenerator concept for any concrete instance of the
http::message
template.
http::message_generator
takes ownership
of a message on construction, erasing the concrete type from the interface.
This makes it practical for use in server applications to implement request handling:
template < class Body, class Fields> http::message_generator handle_request( string_view doc_root, http::request<Body, Fields>&& request);
The beast::write
and beast::async_write
operations are provided for BuffersGenerator. The
http::message::keep_alive
property is made available
for use after writing the message.