|
aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
|
#include <S3BufferTicket.h>
Public Member Functions | |
| S3BufferTicket (const S3BufferTicket &)=delete | |
| S3BufferTicket (S3BufferTicket &&)=delete | |
| S3BufferTicket & | operator= (const S3BufferTicket &)=delete |
| S3BufferTicket & | operator= (S3BufferTicket &&)=delete |
| ~S3BufferTicket () noexcept=default | |
| std::shared_ptr< S3BufferTicket > | Acquire () noexcept |
| ByteCursor | Claim () noexcept |
Owning handle to a buffer that the CRT has loaned out as part of a stream download. The CRT delivers each received part by invoking the BodyCallbackEx with a borrowed ticket pointing at memory in the CRT's pool. The ticket is alive only for the duration of that callback; call Acquire() inside the callback to obtain a shared_ptr that keeps the buffer valid until the last copy of it is destroyed.
|
delete |
|
delete |
|
defaultnoexcept |
|
noexcept |
Take a new reference to the underlying buffer and hand it back as a shared_ptr. Copy the returned shared_ptr freely to share the buffer across owners; the CRT reference is released once when the last copy is destroyed, so acquire/release stays hidden behind the shared_ptr interface.
|
noexcept |
Return a cursor over the object bytes this ticket references. The cursor points directly into the CRT-owned buffer - reading from it copies nothing. It stays valid as long as this ticket (or a shared_ptr obtained from Acquire()) is alive. Returns an empty cursor if the ticket holds no buffer.
|
delete |
|
delete |