Class FetchAssetResponder¶
Defined in File fetch_asset.hpp
Nested Relationships¶
Nested Types¶
Class Documentation¶
-
class FetchAssetResponder¶
A fetch asset responder.
This is the means by which a fetch asset implementation responds to a request from a client. Each request is paired with a unique responder instance, and must be used exactly once.
Public Functions
-
void respondOk(const std::byte *data, size_t size) && noexcept¶
Sends asset data to the client.
- Parameters:
data – Asset data pointer.
size – Asset data length.
-
inline void respondOk(const std::vector<std::byte> &data) && noexcept¶
Sends asset data to the client.
- Parameters:
data – Asset data.
-
void respondError(std::string_view message) && noexcept¶
Sends an error message to the client.
- Parameters:
message – Error message.
-
~FetchAssetResponder() = default¶
Default destructor.
-
FetchAssetResponder(FetchAssetResponder&&) noexcept = default¶
Default move constructor.
-
FetchAssetResponder &operator=(FetchAssetResponder&&) noexcept = default¶
Default move assignment.
-
FetchAssetResponder(const FetchAssetResponder&) = delete¶
-
FetchAssetResponder &operator=(const FetchAssetResponder&) = delete¶
-
void respondOk(const std::byte *data, size_t size) && noexcept¶