-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
S3的getObject支持自定义SetResponseStreamFactory,在外部提供的buffered stream上直接写response数据,这样可以不用多copy一次
https://github.com/aws/aws-sdk-cpp/blob/main/src/aws-cpp-sdk-core/include/aws/core/AmazonWebServiceRequest.h
Aws::S3::Model::GetObjectRequest request;
request.SetResponseStreamFactory(= { return Aws::New("directReadAt", buf, size); });
cos 、oss也都支持类似的接口:
https://github.com/tencentyun/cos-cpp-sdk-v5/blob/master/include/request/object_req.h : GetObjectByStreamReq
https://github.com/aliyun/aliyun-oss-cpp-sdk/blob/master/sdk/include/alibabacloud/oss/ServiceRequest.h : ServiceRequest
否则在拿到response后还需要copy出去到自己的buffer。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels