Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The callback will be invoked once for every chunk in the message payload, as well as once for the last chunk. The invocation happens after the chunk header is available but before any body octets have been parsed.
The extensions are provided in raw, validated form, use [link beast.ref.boost__beast__http__basic_chunk_extensions.parse `chunk_extensions::parse`] to parse the extensions into a structured container for easier access. The implementation type-erases the callback without requiring a dynamic allocation. For this reason, the callback object is passed by a non-constant reference.
The function object will be called with this equivalent signature:
Set a callback to be invoked on each chunk header.
设置一个回调函数,在每次解析分块头部时调用。The callback will be invoked once for every chunk in the message payload, as well as once for the last chunk. The invocation happens after the chunk header is available but before any body octets have been parsed.
The extensions are provided in raw, validated form, use [link beast.ref.boost__beast__http__basic_chunk_extensions.parse `chunk_extensions::parse`] to parse the extensions into a structured container for easier access. The implementation type-erases the callback without requiring a dynamic allocation. For this reason, the callback object is passed by a non-constant reference.
The function object will be called with this equivalent signature:
该回调函数会对消息体中的每个分块调用一次,同时对最后一个分块也调用一次。调用时机在分块头部可用之后、分块体数据开始解析之前。
分块扩展以原始格式提供,且已经过验证。可以使用 [link beast.ref.boost__beast__http__basic_chunk_extensions.parse `chunk_extensions::parse`] 将扩展解析为结构化容器,便于访问。该实现通过类型擦除处理回调,且无需动态分配内存,因此回调对象通过非常量引用传递。
回调函数对象的调用签名等效于: