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

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

#include <IPLookup.h>

Static Public Member Functions

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

Protected Member Functions

void Callback (int a_Result, const char *a_Address)
 Callback that is called by LibEvent when there's an event for the request. More...
 
 cIPLookup (const AString &a_IP, 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_IP
 The IP that was queried (needed for the callbacks). More...
 

Detailed Description

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

Definition at line 21 of file IPLookup.h.

Constructor & Destructor Documentation

◆ cIPLookup()

cIPLookup::cIPLookup ( const AString a_IP,
cNetwork::cResolveNameCallbacksPtr  a_Callbacks 
)
protected

Creates the lookup object.

Doesn't start the lookup yet.

Definition at line 19 of file IPLookup.cpp.

Member Function Documentation

◆ Callback()

void cIPLookup::Callback ( int  a_Result,
const char *  a_Address 
)
protected

Callback that is called by LibEvent when there's an event for the request.

Definition at line 68 of file IPLookup.cpp.

◆ Lookup()

void cIPLookup::Lookup ( const AString a_IP,
cNetwork::cResolveNameCallbacksPtr  a_Callbacks 
)
static

Creates a lookup object and schedules the lookup.

Definition at line 30 of file IPLookup.cpp.

Member Data Documentation

◆ m_Callbacks

cNetwork::cResolveNameCallbacksPtr cIPLookup::m_Callbacks
protected

The callbacks to call for resolved names / errors.

Definition at line 31 of file IPLookup.h.

◆ m_IP

AString cIPLookup::m_IP
protected

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

Definition at line 34 of file IPLookup.h.


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