ark::comms::HttpClientOndiskRequestPayload
Defined in header “ark/comms/http_server.hh”.
This structure represents content for an HTTP payload. It maps an open file descriptor that we write to, to a path on-disk, and handles automatic cleanup when the client disconnects.
Methods
-
~HttpClientOndiskRequestPayload()
Destructor; closes and deletes any content (if it still exists). -
void open(const std::filesystem::path & base_dir)
Opens a unique filename in the specified base directory. -
void write(const void * data, size_t data_size)
Write sthe given bytes out to the file descriptor. -
void close()
Closes the file descriptor.
Variables
-
std::filesystem::path path
The path to the request payload. -
int fd= -1
A descriptor to the content. -
size_t bytes_written= 0
Tracks the number of bytes written.