Wizard
Software Engineering Project - Wizard
Loading...
Searching...
No Matches
sockpp::getaddrinfo_error Class Reference

#include <exception.h>

Inheritance diagram for sockpp::getaddrinfo_error:

Public Member Functions

 getaddrinfo_error (int err, const std::string &hostname)
 
int error () const
 
const std::string & hostname () const
 

Detailed Description

Errors from getaddrinfo. These are errors relating to DNS lookup, returned from the getaddrinfo system call. Their codes are declared in <netdb.h>.

Constructor & Destructor Documentation

◆ getaddrinfo_error()

sockpp::getaddrinfo_error::getaddrinfo_error ( int err,
const std::string & hostname )

Constructs an error with the specified getaddrinfo error code.

Parameters
errThe error number, as returned by getaddrinfo.
hostnameThe DNS name being resolved that triggered the error.

Member Function Documentation

◆ error()

int sockpp::getaddrinfo_error::error ( ) const
inline

Get the error number.

Returns
The error number returned by getaddrinfo.

◆ hostname()

const std::string & sockpp::getaddrinfo_error::hostname ( ) const
inline

Get the hostname that triggered the error.

Returns
The hostname that getaddrinfo failed to resolve.

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