Toolbox snapshot
The Reactive C++ Toolbox
Loading...
Searching...
No Matches
Public Member Functions | List of all members
toolbox::net::Resolver Class Reference

#include <toolbox/net/Resolver.hpp>

Public Member Functions

 Resolver ()=default
 
 ~Resolver ()=default
 
 Resolver (const Resolver &rhs)=delete
 
Resolveroperator= (const Resolver &rhs)=delete
 
 Resolver (Resolver &&)=delete
 
Resolveroperator= (Resolver &&)=delete
 
bool run ()
 
void stop ()
 Interrupt and exit any inprogress call to run().
 
void clear ()
 Clear task queue. Any pending tasks will be cancelled, resulting in a broken promise.
 
AddrInfoFuture resolve (std::string uri, int type)
 Schedule a URI socket name resolution.
 

Detailed Description

The Resolver is designed to resolve socket URIs to address endpoints on a background thread, which may include a DNS lookup depending on the URI.

Definition at line 34 of file Resolver.hpp.

Constructor & Destructor Documentation

◆ Resolver() [1/3]

toolbox::net::Resolver::Resolver ( )
default

◆ ~Resolver()

toolbox::net::Resolver::~Resolver ( )
default

◆ Resolver() [2/3]

toolbox::net::Resolver::Resolver ( const Resolver rhs)
delete

◆ Resolver() [3/3]

toolbox::net::Resolver::Resolver ( Resolver &&  )
delete

Member Function Documentation

◆ operator=() [1/2]

Resolver & toolbox::net::Resolver::operator= ( const Resolver rhs)
delete

◆ operator=() [2/2]

Resolver & toolbox::net::Resolver::operator= ( Resolver &&  )
delete

◆ run()

bool toolbox::net::Resolver::run ( )

Wait for and execute the next task in the queue.

Returns
false if the resolver was stopped.

Definition at line 24 of file Resolver.cpp.

◆ stop()

void toolbox::net::Resolver::stop ( )

Interrupt and exit any inprogress call to run().

Definition at line 29 of file Resolver.cpp.

◆ clear()

void toolbox::net::Resolver::clear ( )

Clear task queue. Any pending tasks will be cancelled, resulting in a broken promise.

Definition at line 34 of file Resolver.cpp.

◆ resolve()

AddrInfoFuture toolbox::net::Resolver::resolve ( std::string  uri,
int  type 
)

Schedule a URI socket name resolution.

Definition at line 40 of file Resolver.cpp.

Referenced by BOOST_AUTO_TEST_CASE().


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