LLFIO v2.00
Loading...
Searching...
No Matches
llfio_v2_xxx::ip::resolver Class Reference

Returned by resolve() as a handle to the asynchronous name resolution operation. More...

#include "byte_socket_handle.hpp"

Public Member Functions

const std::string & name () const noexcept
 Returns the name being resolved.
 
const std::string & service () const noexcept
 Returns the service being resolved.
 
bool incomplete () const noexcept
 Returns true if the deadline expired, and the returned list of addresses is incomplete. Until get() is called, always is true.
 
result< span< address > > get () noexcept
 Returns the array of addresses, blocking until completion if necessary, returning any error if one occurred.
 
result< void > wait (deadline d={}) noexcept
 Wait for up the deadline for the array of addresses to be retrieved.
 
template<class Rep , class Period >
result< bool > wait_for (const std::chrono::duration< Rep, Period > &duration) const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
template<class Clock , class Duration >
result< bool > wait_until (const std::chrono::time_point< Clock, Duration > &timeout) const noexcept
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 

Detailed Description

Returned by resolve() as a handle to the asynchronous name resolution operation.

Member Function Documentation

◆ wait_for()

template<class Rep , class Period >
result< bool > llfio_v2_xxx::ip::resolver::wait_for ( const std::chrono::duration< Rep, Period > &  duration) const
inlinenoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

209 {
210 auto r = wait(duration);
211 if(!r && r.error() == errc::timed_out)
212 {
213 return false;
214 }
215 OUTCOME_TRY(std::move(r));
216 return true;
217 }
result< void > wait(deadline d={}) noexcept
Wait for up the deadline for the array of addresses to be retrieved.

◆ wait_until()

template<class Clock , class Duration >
result< bool > llfio_v2_xxx::ip::resolver::wait_until ( const std::chrono::time_point< Clock, Duration > &  timeout) const
inlinenoexcept

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

220 {
221 auto r = wait(timeout);
222 if(!r && r.error() == errc::timed_out)
223 {
224 return false;
225 }
226 OUTCOME_TRY(std::move(r));
227 return true;
228 }

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