en	Serializer Stream Operations
zh-hans	序列化器流操作

en	Non-trivial algorithms need to do more than send entire messages at once, such as:
zh-hans	非平凡算法需要执行的操作不仅限于一次性发送完整消息，该算法需要做更多的事，例如：

en	* Send the header first, and the body later.
zh-hans	* 先发送头部，再发送消息体。

en	* Send a message incrementally: bounded work in each I/O cycle.
zh-hans	* 逐步发送消息：每个 I/O 周期内执行有限的工作量。

en	* Use a series of caller-provided buffers to represent the body.
zh-hans	* 使用调用方提供的一系列缓冲区来表示消息体。

en	These tasks may be performed by using the serializer stream interfaces. To use these interfaces, first construct an appropriate serializer from the message to be sent:
zh-hans	这些任务可通过使用序列化器流接口来完成。使用这些接口时，首先从待发送的消息构造相应的序列化器：

en	Serializer
zh-hans	序列化器

en	Name
zh-hans	名称

en	Description
zh-hans	描述

en	__serializer__
zh-hans	__序列化器__

en	/// Provides buffer oriented HTTP message serialization functionality. template< bool isRequest, class Body, class Fields = fields > class serializer;
zh-hans	/// 提供面向缓冲区的 HTTP 消息序列化功能。 template< bool isRequest, class Body, class Fields = fields > class serializer;

en	[link beast.ref.boost__beast__http__request_serializer `request_serializer`]

en	/// A serializer for HTTP/1 requests template< class Body, class Fields = fields > using request_serializer = serializer<true, Body, Fields>;
zh-hans	/// HTTP/1 请求序列化器 template< class Body, class Fields = fields > using request_serializer = serializer<true, Body, Fields>;

en	[link beast.ref.boost__beast__http__response_serializer `response_serializer`]

en	/// A serializer for HTTP/1 responses template< class Body, class Fields = fields > using response_serializer = serializer<false, Body, Fields>;
zh-hans	/// HTTP/1 响应序列化器 template< class Body, class Fields = fields > using response_serializer = serializer<false, Body, Fields>;

en	The choices for template types must match the message passed on construction. This code creates an HTTP response and the corresponding serializer:
zh-hans	模板类型的选择必须与构造时传入的消息相匹配。以下代码用于创建一个 HTTP 响应及其对应的序列化器：

en	The stream operations which work on serializers are:
zh-hans	用于操作序列化器的流操作如下：

en	Serializer Stream Operations
zh-hans	序列化器流操作

en	Name
zh-hans	名称

en	Description
zh-hans	描述

en	[link beast.ref.boost__beast__http__write.overload1 [*write]]

en	Send everything in a __serializer__ to a __SyncWriteStream__.
zh-hans	将 __serializer__ 中的全部数据发送到 __SyncWriteStream__。

en	[link beast.ref.boost__beast__http__async_write.overload1 [*async_write]]

en	Send everything in a __serializer__ asynchronously to an __AsyncWriteStream__.
zh-hans	将 __serializer__ 中的全部数据异步发送到 __AsyncWriteStream__。

en	[link beast.ref.boost__beast__http__write_header.overload1 [*write_header]]

en	Send only the header from a __serializer__ to a __SyncWriteStream__.
zh-hans	仅将 __serializer__ 中的头部发送到 __SyncWriteStream__。

en	[link beast.ref.boost__beast__http__async_write_header [*async_write_header]]

en	Send only the header from a __serializer__ asynchronously to an __AsyncWriteStream__.
zh-hans	仅将 __serializer__ 中的头部异步发送到 __AsyncWriteStream__。

en	[link beast.ref.boost__beast__http__write_some.overload1 [*write_some]]

en	Send part of a __serializer__ to a __SyncWriteStream__.
zh-hans	将 __serializer__ 中的部分数据发送到 __SyncWriteStream__。

en	[link beast.ref.boost__beast__http__async_write_some [*async_write_some]]

en	Send part of a __serializer__ asynchronously to an __AsyncWriteStream__.
zh-hans	将 __serializer__ 中的部分数据异步发送到 __AsyncWriteStream__。

en	Here is an example of using a serializer to send a message on a stream synchronously. This performs the same operation as calling `write(stream, m)`:
zh-hans	以下示例演示如何使用序列化器在流上同步发送消息。其效果与直接调用 `write(stream, m)` 相同：