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

Synchronized URL header response completion as used by asynchronous read_url_stream(). More...

#include <io_util.hpp>

Collaboration diagram for jau::io::url_header_resp:

Public Member Functions

 url_header_resp () noexcept
 
bool completed () const noexcept
 Returns whether URL header is completed.
 
void notify_complete (const int32_t response_code=200) noexcept
 Notify completion, see completed()
 
int32_t response_code () const noexcept
 
bool wait_until_completion (const jau::fraction_i64 &timeout) noexcept
 Wait until completed() has been reached.
 

Detailed Description

Synchronized URL header response completion as used by asynchronous read_url_stream().

See also
url_header_sync::completed()

Definition at line 193 of file io_util.hpp.

Constructor & Destructor Documentation

◆ url_header_resp()

jau::io::url_header_resp::url_header_resp ( )
inlinenoexcept

Definition at line 201 of file io_util.hpp.

Member Function Documentation

◆ completed()

bool jau::io::url_header_resp::completed ( ) const
inlinenoexcept

Returns whether URL header is completed.

Completion is reached in any of the following cases

  • Final (http) CRLF message received
  • Any http header error response received
  • First data package received
  • End of operation

Definition at line 214 of file io_util.hpp.

◆ response_code()

int32_t jau::io::url_header_resp::response_code ( ) const
inlinenoexcept

Definition at line 216 of file io_util.hpp.

Here is the caller graph for this function:

◆ notify_complete()

void jau::io::url_header_resp::notify_complete ( const int32_t response_code = 200)
noexcept

Notify completion, see completed()

Definition at line 451 of file io_util.cpp.

Here is the caller graph for this function:

◆ wait_until_completion()

bool jau::io::url_header_resp::wait_until_completion ( const jau::fraction_i64 & timeout)
noexcept

Wait until completed() has been reached.

Parameters
timeoutmaximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely
Returns
true if completed within timeout, otherwise false

Definition at line 460 of file io_util.cpp.


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