Cuberite
A lightweight, fast and extensible game server for Minecraft
Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cHostnameLookup Class Reference

Holds information about an in-progress Hostname-to-IP lookup. More...

#include <HostnameLookup.h>

Static Public Member Functions

static void Lookup (const AString &a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks)
 Creates a lookup object and schedules the lookup. More...
 

Protected Member Functions

void Callback (int a_ErrCode, struct addrinfo *a_Addr)
 
 cHostnameLookup (const AString &a_Hostname, cNetwork::cResolveNameCallbacksPtr a_Callbacks)
 Creates the lookup object. More...
 

Protected Attributes

cNetwork::cResolveNameCallbacksPtr m_Callbacks
 The callbacks to call for resolved names / errors. More...
 
AString m_Hostname
 The hostname that was queried (needed for the callbacks). More...
 

Detailed Description

Holds information about an in-progress Hostname-to-IP lookup.

Definition at line 21 of file HostnameLookup.h.

Constructor & Destructor Documentation

◆ cHostnameLookup()

cHostnameLookup::cHostnameLookup ( const AString a_Hostname,
cNetwork::cResolveNameCallbacksPtr  a_Callbacks 
)
protected

Creates the lookup object.

Doesn't start the lookup yet.

Definition at line 18 of file HostnameLookup.cpp.

Member Function Documentation

◆ Callback()

void cHostnameLookup::Callback ( int  a_ErrCode,
struct addrinfo *  a_Addr 
)
protected

Definition at line 55 of file HostnameLookup.cpp.

◆ Lookup()

void cHostnameLookup::Lookup ( const AString a_Hostname,
cNetwork::cResolveNameCallbacksPtr  a_Callbacks 
)
static

Creates a lookup object and schedules the lookup.

Definition at line 28 of file HostnameLookup.cpp.

Member Data Documentation

◆ m_Callbacks

cNetwork::cResolveNameCallbacksPtr cHostnameLookup::m_Callbacks
protected

The callbacks to call for resolved names / errors.

Definition at line 33 of file HostnameLookup.h.

◆ m_Hostname

AString cHostnameLookup::m_Hostname
protected

The hostname that was queried (needed for the callbacks).

Definition at line 36 of file HostnameLookup.h.


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