aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Aws::Crt::S3::S3MetaRequest Class Referencefinal

#include <S3.h>

Public Member Functions

 S3MetaRequest (const S3MetaRequest &)=delete
 
 S3MetaRequest (S3MetaRequest &&)=delete
 
S3MetaRequestoperator= (const S3MetaRequest &)=delete
 
S3MetaRequestoperator= (S3MetaRequest &&)=delete
 
 ~S3MetaRequest () noexcept=default
 
void Cancel () noexcept
 
void IncrementReadWindow (uint64_t bytes) noexcept
 
std::future< intWrite (ByteCursor data, bool eof) noexcept
 
int LastError () const noexcept
 

Detailed Description

Handle to a single in-flight or recently-completed meta request, obtained from S3Client::MakeMetaRequest. Callbacks continue to fire correctly even if the caller drops their shared_ptr: the CRT's callback bundle keeps its own reference until shutdown.

Constructor & Destructor Documentation

◆ S3MetaRequest() [1/2]

Aws::Crt::S3::S3MetaRequest::S3MetaRequest ( const S3MetaRequest )
delete

◆ S3MetaRequest() [2/2]

Aws::Crt::S3::S3MetaRequest::S3MetaRequest ( S3MetaRequest &&  )
delete

◆ ~S3MetaRequest()

Aws::Crt::S3::S3MetaRequest::~S3MetaRequest ( )
defaultnoexcept

Member Function Documentation

◆ Cancel()

void Aws::Crt::S3::S3MetaRequest::Cancel ( )
noexcept

Request cancellation of the in-flight meta request. The CRT cancels asynchronously; the finish and shutdown callbacks will still fire to signal final teardown.

◆ IncrementReadWindow()

void Aws::Crt::S3::S3MetaRequest::IncrementReadWindow ( uint64_t  bytes)
noexcept

Move the flow-control read window forward by the given number of bytes. Only meaningful when the client was configured with read backpressure (S3ClientConfig::SetReadBackpressure): the CRT pauses delivering body data once the window is exhausted, and the application must call this to let more data flow. A typical pattern is to increment by the size of each chunk once it has been consumed.

Parameters
bytesnumber of bytes to add to the read window.

◆ LastError()

int Aws::Crt::S3::S3MetaRequest::LastError ( ) const
noexcept
Returns
the CRT error code from the most recent failed operation on this meta request, or AWS_ERROR_UNKNOWN if none has been recorded.

◆ operator=() [1/2]

S3MetaRequest & Aws::Crt::S3::S3MetaRequest::operator= ( const S3MetaRequest )
delete

◆ operator=() [2/2]

S3MetaRequest & Aws::Crt::S3::S3MetaRequest::operator= ( S3MetaRequest &&  )
delete

◆ Write()

std::future< int > Aws::Crt::S3::S3MetaRequest::Write ( ByteCursor  data,
bool  eof 
)
noexcept

Write the next chunk of body data for an async-writes PUT (see S3PutObjectMetaRequestOptions::CreateWithAsyncWrites). The returned future completes with the CRT error code (0 on success) once the CRT is ready to accept more data. You MUST NOT call Write again until the previous call's future has completed. Pass eof=true for the final chunk and do not call Write again afterward.

Parameters
datathe chunk of body bytes to send; may be any size.
eoftrue if this is the final chunk.
Returns
a future resolving to the CRT error code (0 on success).

The documentation for this class was generated from the following files: