jaulib v1.1.2-85-g839acae-dirty
Jau Support Library (C++, Java, ..)
Public Member Functions | List of all members
jau::io::url_header_sync Class Reference

Synchronization for URL header completion as used by asynchronous read_url_stream(). More...

#include <io_util.hpp>

Collaboration diagram for jau::io::url_header_sync:

Public Member Functions

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

Detailed Description

Synchronization for URL header completion as used by asynchronous read_url_stream().

See also
url_header_sync::completed()

Definition at line 177 of file io_util.hpp.

Constructor & Destructor Documentation

◆ url_header_sync()

jau::io::url_header_sync::url_header_sync ( )
inlinenoexcept

Definition at line 184 of file io_util.hpp.

Member Function Documentation

◆ completed()

bool jau::io::url_header_sync::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 197 of file io_util.hpp.

Here is the caller graph for this function:

◆ notify_complete()

void jau::io::url_header_sync::notify_complete ( )
noexcept

Notify completion, see completed()

Definition at line 434 of file io_util.cpp.

Here is the caller graph for this function:

◆ wait_until_completion()

bool jau::io::url_header_sync::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 442 of file io_util.cpp.


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