Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The callback will be invoked one or more times to provide buffers corresponding to the chunk body for the current chunk. The callback receives the number of octets remaining in this chunk body including the octets in the buffer provided.
The callback must return the number of octets actually consumed. Any octets not consumed will be presented again in a subsequent invocation of the callback. 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 chunk body data.
设置一个回调函数,在分块体数据到达时调用。The callback will be invoked one or more times to provide buffers corresponding to the chunk body for the current chunk. The callback receives the number of octets remaining in this chunk body including the octets in the buffer provided.
The callback must return the number of octets actually consumed. Any octets not consumed will be presented again in a subsequent invocation of the callback. 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:
该回调函数会被调用一次或多次,用于提供当前分块体对应的缓冲区数据。回调函数会收到当前分块体中剩余的字节数(包含当前缓冲区中的字节)。
回调函数必须返回实际消耗的字节数。未被消耗的字节会在后续回调调用中再次提供。该实现通过类型擦除处理回调,且无需动态分配内存,因此回调对象通过非常量引用传递。
回调函数对象的调用签名等效于: