Loading…
|
Translation changed |
|
|
String added in the repository |
|
Loading…
|
Translation changed |
|
|
String added in the repository |
|
The function will ensure that `!ec` is `true` if there was no error or set to the appropriate error code if there was one.
Called once to fully initialize the object before any calls to `put`. The message body is valid before entering this function, and remains valid until the reader is destroyed. The value of `n` will be set to the content length of the body if known, otherwise `n` will be equal to `boost::none`. Implementations of [*BodyReader] may use this information to optimize allocation.
在调用 put 之前调用一次,以完全初始化对象。消息体在进入该函数前有效,并持续有效直到读取器销毁为止。n 的值在已知时表示消息体的内容长度,否则为 boost::none。[*BodyReader] 的实现可使用此信息优化内存分配。The function will ensure that `!ec` is `true` if there was no error or set to the appropriate error code if there was one.
该函数在无错误时确保 !ec 为 true,否则将 ec 设置为对应的错误码。