jaulib v1.3.8
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
jau::io::AsyncStreamResponse Struct Reference

Asynchronous stream response. More...

#include <io_util.hpp>

Collaboration diagram for jau::io::AsyncStreamResponse:

Public Member Functions

 AsyncStreamResponse ()
 
 AsyncStreamResponse (net_tk_handle handle_)
 
constexpr_atomic bool failed () const noexcept
 Stream failed and is aborted, i.e.
 
constexpr_atomic bool processing () const noexcept
 Stream processing in progress, i.e.
 
constexpr_atomic bool success () const noexcept
 Stream completed successfully, i.e.
 

Public Attributes

relaxed_atomic_uint64 content_length
 content_length tracking the content_length
 
net_tk_handle handle
 used network tookit handle, if owned by caller
 
relaxed_atomic_bool has_content_length
 indicating whether content_length is known from server
 
url_header_resp header_resp
 synchronized URL header response completion
 
relaxed_atomic_io_result_t result
 tracking io_result_t. If set to other than io_result_t::NONE while streaming, streaming is aborted. See failed(), processing() and success()
 
std::vector< uint8_t > result_data
 piggy-bag result data compiled by user, e.g. via AsyncStreamConsumerFunc
 
std::string result_text
 piggy-bag result data compiled by user, e.g. via AsyncStreamConsumerFunc
 
std::thread thread
 background reading thread unique-pointer
 
relaxed_atomic_uint64 total_read
 tracking the total_read
 

Detailed Description

Asynchronous stream response.

Definition at line 326 of file io_util.hpp.

Constructor & Destructor Documentation

◆ AsyncStreamResponse() [1/2]

jau::io::AsyncStreamResponse::AsyncStreamResponse ( net_tk_handle handle_)
inline

Definition at line 327 of file io_util.hpp.

Here is the caller graph for this function:

◆ AsyncStreamResponse() [2/2]

jau::io::AsyncStreamResponse::AsyncStreamResponse ( )
inline

Definition at line 335 of file io_util.hpp.

Member Function Documentation

◆ failed()

constexpr_atomic bool jau::io::AsyncStreamResponse::failed ( ) const
inlinenoexcept

Stream failed and is aborted, i.e.

io_result_t::FAILED == result

Definition at line 339 of file io_util.hpp.

◆ processing()

constexpr_atomic bool jau::io::AsyncStreamResponse::processing ( ) const
inlinenoexcept

Stream processing in progress, i.e.

io_result_t::NONE == result

Definition at line 341 of file io_util.hpp.

◆ success()

constexpr_atomic bool jau::io::AsyncStreamResponse::success ( ) const
inlinenoexcept

Stream completed successfully, i.e.

io_result_t::SUCCESS == result

Definition at line 343 of file io_util.hpp.

Member Data Documentation

◆ handle

net_tk_handle jau::io::AsyncStreamResponse::handle

used network tookit handle, if owned by caller

Definition at line 346 of file io_util.hpp.

◆ thread

std::thread jau::io::AsyncStreamResponse::thread

background reading thread unique-pointer

Definition at line 348 of file io_util.hpp.

◆ header_resp

url_header_resp jau::io::AsyncStreamResponse::header_resp

synchronized URL header response completion

Definition at line 350 of file io_util.hpp.

◆ has_content_length

relaxed_atomic_bool jau::io::AsyncStreamResponse::has_content_length

indicating whether content_length is known from server

Definition at line 352 of file io_util.hpp.

◆ content_length

relaxed_atomic_uint64 jau::io::AsyncStreamResponse::content_length

content_length tracking the content_length

Definition at line 354 of file io_util.hpp.

◆ total_read

relaxed_atomic_uint64 jau::io::AsyncStreamResponse::total_read

tracking the total_read

Definition at line 356 of file io_util.hpp.

◆ result

relaxed_atomic_io_result_t jau::io::AsyncStreamResponse::result

tracking io_result_t. If set to other than io_result_t::NONE while streaming, streaming is aborted. See failed(), processing() and success()

Definition at line 358 of file io_util.hpp.

◆ result_data

std::vector<uint8_t> jau::io::AsyncStreamResponse::result_data

piggy-bag result data compiled by user, e.g. via AsyncStreamConsumerFunc

Definition at line 360 of file io_util.hpp.

◆ result_text

std::string jau::io::AsyncStreamResponse::result_text

piggy-bag result data compiled by user, e.g. via AsyncStreamConsumerFunc

Definition at line 362 of file io_util.hpp.


The documentation for this struct was generated from the following file: