CppServer  1.0.4.0
C++ Server Library
Public Member Functions | List of all members
CppServer::Asio::TCPResolver Class Reference

TCP resolver. More...

#include <tcp_resolver.h>

Public Member Functions

 TCPResolver (const std::shared_ptr< Service > &service)
 Initialize resolver with a given Asio service. More...
 
 TCPResolver (const TCPResolver &)=delete
 
 TCPResolver (TCPResolver &&)=delete
 
virtual ~TCPResolver ()
 
TCPResolveroperator= (const TCPResolver &)=delete
 
TCPResolveroperator= (TCPResolver &&)=delete
 
std::shared_ptr< Service > & service () noexcept
 Get the Asio service. More...
 
std::shared_ptr< asio::io_service > & io_service () noexcept
 Get the Asio IO service. More...
 
asio::io_service::strand & strand () noexcept
 Get the Asio service strand for serialized handler execution. More...
 
asio::ip::tcp::resolver & resolver () noexcept
 Get the TCP resolver. More...
 
virtual void Cancel ()
 Cancel any asynchronous operations that are waiting on the resolver. More...
 

Detailed Description

TCP resolver.

TCP resolver is used to resolve DNS while connecting TCP/SSL clients.

Thread-safe.

Definition at line 23 of file tcp_resolver.h.

Constructor & Destructor Documentation

◆ TCPResolver() [1/3]

CppServer::Asio::TCPResolver::TCPResolver ( const std::shared_ptr< Service > &  service)

Initialize resolver with a given Asio service.

Parameters
service- Asio service

Definition at line 14 of file tcp_resolver.cpp.

◆ TCPResolver() [2/3]

CppServer::Asio::TCPResolver::TCPResolver ( const TCPResolver )
delete

◆ TCPResolver() [3/3]

CppServer::Asio::TCPResolver::TCPResolver ( TCPResolver &&  )
delete

◆ ~TCPResolver()

virtual CppServer::Asio::TCPResolver::~TCPResolver ( )
inlinevirtual

Definition at line 33 of file tcp_resolver.h.

Member Function Documentation

◆ Cancel()

virtual void CppServer::Asio::TCPResolver::Cancel ( )
inlinevirtual

Cancel any asynchronous operations that are waiting on the resolver.

Definition at line 48 of file tcp_resolver.h.

◆ io_service()

std::shared_ptr<asio::io_service>& CppServer::Asio::TCPResolver::io_service ( )
inlinenoexcept

Get the Asio IO service.

Definition at line 41 of file tcp_resolver.h.

◆ operator=() [1/2]

TCPResolver& CppServer::Asio::TCPResolver::operator= ( const TCPResolver )
delete

◆ operator=() [2/2]

TCPResolver& CppServer::Asio::TCPResolver::operator= ( TCPResolver &&  )
delete

◆ resolver()

asio::ip::tcp::resolver& CppServer::Asio::TCPResolver::resolver ( )
inlinenoexcept

Get the TCP resolver.

Definition at line 45 of file tcp_resolver.h.

◆ service()

std::shared_ptr<Service>& CppServer::Asio::TCPResolver::service ( )
inlinenoexcept

Get the Asio service.

Definition at line 39 of file tcp_resolver.h.

◆ strand()

asio::io_service::strand& CppServer::Asio::TCPResolver::strand ( )
inlinenoexcept

Get the Asio service strand for serialized handler execution.

Definition at line 43 of file tcp_resolver.h.


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