mirror of
https://github.com/boostorg/beast.git
synced 2025-08-02 14:24:31 +02:00
Rename to make_serializer
This commit is contained in:
@@ -43,8 +43,8 @@
|
|||||||
<member><link linkend="beast.ref.http__empty_decorator">empty_decorator</link></member>
|
<member><link linkend="beast.ref.http__empty_decorator">empty_decorator</link></member>
|
||||||
<member><link linkend="beast.ref.http__request">request</link></member>
|
<member><link linkend="beast.ref.http__request">request</link></member>
|
||||||
<member><link linkend="beast.ref.http__response">response</link></member>
|
<member><link linkend="beast.ref.http__response">response</link></member>
|
||||||
|
<member><link linkend="beast.ref.http__serializer">serializer</link></member>
|
||||||
<member><link linkend="beast.ref.http__string_body">string_body</link></member>
|
<member><link linkend="beast.ref.http__string_body">string_body</link></member>
|
||||||
<member><link linkend="beast.ref.http__write_stream">write_stream</link></member>
|
|
||||||
</simplelist>
|
</simplelist>
|
||||||
<bridgehead renderas="sect3">rfc7230</bridgehead>
|
<bridgehead renderas="sect3">rfc7230</bridgehead>
|
||||||
<simplelist type="vert" columns="1">
|
<simplelist type="vert" columns="1">
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<member><link linkend="beast.ref.http__async_write">async_write</link></member>
|
<member><link linkend="beast.ref.http__async_write">async_write</link></member>
|
||||||
<member><link linkend="beast.ref.http__is_keep_alive">is_keep_alive</link></member>
|
<member><link linkend="beast.ref.http__is_keep_alive">is_keep_alive</link></member>
|
||||||
<member><link linkend="beast.ref.http__is_upgrade">is_upgrade</link></member>
|
<member><link linkend="beast.ref.http__is_upgrade">is_upgrade</link></member>
|
||||||
<member><link linkend="beast.ref.http__make_write_stream">make_write_stream</link></member>
|
<member><link linkend="beast.ref.http__make_serializer">make_serializer</link></member>
|
||||||
<member><link linkend="beast.ref.http__operator_ls_">operator<<</link></member>
|
<member><link linkend="beast.ref.http__operator_ls_">operator<<</link></member>
|
||||||
<member><link linkend="beast.ref.http__prepare">prepare</link></member>
|
<member><link linkend="beast.ref.http__prepare">prepare</link></member>
|
||||||
<member><link linkend="beast.ref.http__read">read</link></member>
|
<member><link linkend="beast.ref.http__read">read</link></member>
|
||||||
|
@@ -1001,7 +1001,7 @@ write(SyncWriteStream& stream,
|
|||||||
"Body requirements not met");
|
"Body requirements not met");
|
||||||
static_assert(is_body_reader<Body>::value,
|
static_assert(is_body_reader<Body>::value,
|
||||||
"BodyReader requirements not met");
|
"BodyReader requirements not met");
|
||||||
auto ws = make_write_stream(msg);
|
auto ws = make_serializer(msg);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
ws.write_some(stream, ec);
|
ws.write_some(stream, ec);
|
||||||
|
@@ -78,7 +78,7 @@ struct empty_decorator
|
|||||||
|
|
||||||
To use this class, construct an instance with the message
|
To use this class, construct an instance with the message
|
||||||
to be sent. To make it easier to declare the type, the
|
to be sent. To make it easier to declare the type, the
|
||||||
helper function @ref make_write_stream is provided:
|
helper function @ref make_serializer is provided:
|
||||||
|
|
||||||
The implementation will automatically perform chunk encoding
|
The implementation will automatically perform chunk encoding
|
||||||
if the contents of the message indicate that chunk encoding
|
if the contents of the message indicate that chunk encoding
|
||||||
@@ -156,7 +156,7 @@ struct empty_decorator
|
|||||||
|
|
||||||
@tparam Allocator The type of allocator to use.
|
@tparam Allocator The type of allocator to use.
|
||||||
|
|
||||||
@see @ref make_write_stream
|
@see @ref make_serializer
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
bool isRequest, class Body, class Fields,
|
bool isRequest, class Body, class Fields,
|
||||||
@@ -420,7 +420,7 @@ inline
|
|||||||
serializer<isRequest, Body, Fields,
|
serializer<isRequest, Body, Fields,
|
||||||
typename std::decay<Decorator>::type,
|
typename std::decay<Decorator>::type,
|
||||||
typename std::decay<Allocator>::type>
|
typename std::decay<Allocator>::type>
|
||||||
make_write_stream(message<isRequest, Body, Fields> const& m,
|
make_serializer(message<isRequest, Body, Fields> const& m,
|
||||||
Decorator const& decorator = Decorator{},
|
Decorator const& decorator = Decorator{},
|
||||||
Allocator const& allocator = Allocator{})
|
Allocator const& allocator = Allocator{})
|
||||||
{
|
{
|
||||||
|
@@ -77,7 +77,7 @@ public:
|
|||||||
req.body = "Hello, world!";
|
req.body = "Hello, world!";
|
||||||
|
|
||||||
// send header
|
// send header
|
||||||
auto ws = make_write_stream(req);
|
auto ws = make_serializer(req);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
ws.async_write_some(stream, yield);
|
ws.async_write_some(stream, yield);
|
||||||
@@ -162,7 +162,7 @@ public:
|
|||||||
m.target("/");
|
m.target("/");
|
||||||
m.fields.insert("User-Agent", "test");
|
m.fields.insert("User-Agent", "test");
|
||||||
m.fields.insert("Content-Length", s.size());
|
m.fields.insert("Content-Length", s.size());
|
||||||
auto ws = make_write_stream(m);
|
auto ws = make_serializer(m);
|
||||||
error_code ec;
|
error_code ec;
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
|
@@ -765,7 +765,7 @@ public:
|
|||||||
isRequest, Body, Fields> const& m, error_code& ec,
|
isRequest, Body, Fields> const& m, error_code& ec,
|
||||||
Decorator const& decorator = Decorator{})
|
Decorator const& decorator = Decorator{})
|
||||||
{
|
{
|
||||||
auto ws = make_write_stream(m, decorator);
|
auto ws = make_serializer(m, decorator);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
stream.nwrite = 0;
|
stream.nwrite = 0;
|
||||||
@@ -787,7 +787,7 @@ public:
|
|||||||
error_code& ec, yield_context yield,
|
error_code& ec, yield_context yield,
|
||||||
Decorator const& decorator = Decorator{})
|
Decorator const& decorator = Decorator{})
|
||||||
{
|
{
|
||||||
auto ws = make_write_stream(m);
|
auto ws = make_serializer(m);
|
||||||
for(;;)
|
for(;;)
|
||||||
{
|
{
|
||||||
stream.nwrite = 0;
|
stream.nwrite = 0;
|
||||||
@@ -969,7 +969,7 @@ public:
|
|||||||
m.body.first = boost::none;
|
m.body.first = boost::none;
|
||||||
m.body.second = true;
|
m.body.second = true;
|
||||||
|
|
||||||
auto w = make_write_stream(m);
|
auto w = make_serializer(m);
|
||||||
|
|
||||||
// send the header first, so the
|
// send the header first, so the
|
||||||
// other end gets it right away
|
// other end gets it right away
|
||||||
|
Reference in New Issue
Block a user