address_resolver< P > Class Template Reference

#include <address_resolver.hpp>

Public Types

typedef P::peer peer
 

Public Member Functions

 address_resolver ()=default
 
std::vector< peerresolve (const std::string &hostname, const std::string &port)
 
std::vector< peerresolve (const char *hostname, const char *port)
 

Detailed Description

template<class P>
class address_resolver< P >

The address resolver resolves a given host and port to a peer object representing the given address

Template Parameters
PType of protocol

Member Typedef Documentation

◆ peer

template<class P >
typedef P::peer address_resolver< P >::peer

Shortcut to peer type

Constructor & Destructor Documentation

◆ address_resolver()

template<class P >
address_resolver< P >::address_resolver ( )
default

Default constructor

Member Function Documentation

◆ resolve() [1/2]

template<class P >
std::vector< peer > address_resolver< P >::resolve ( const char *  hostname,
const char *  port 
)

Resolves the given host and port to a list of valid peers representing the ip addresses of the host either in IPv4 or IPv6 format

Parameters
hostnameHostname to resolve
portPort to resolve
Returns
A list of peers representing the host and port

◆ resolve() [2/2]

template<class P >
std::vector< peer > address_resolver< P >::resolve ( const std::string &  hostname,
const std::string &  port 
)

Resolves the given host and port to a list of valid peers representing the ip addresses of the host either in IPv4 or IPv6 format

Parameters
hostnameHostname to resolve
portPort to resolve
Returns
A list of peers representing the host and port

The documentation for this class was generated from the following file:
  • matador/net/address_resolver.hpp