Cuberite
A lightweight, fast and extensible game server for Minecraft
|
Callbacks used when resolving names to IPs. More...
#include <Network.h>
Public Member Functions | |
virtual void | OnError (int a_ErrorCode, const AString &a_ErrorMsg)=0 |
Called when an error is encountered while resolving. More... | |
virtual void | OnFinished (void)=0 |
Called when all the addresses resolved have been reported via the OnNameResolved() callback. More... | |
virtual void | OnNameResolved (const AString &a_Name, const AString &a_IP)=0 |
Called when the hostname is successfully resolved into an IP address. More... | |
virtual bool | OnNameResolvedV4 (const AString &a_Name, const sockaddr_in *a_IP) |
Called when the hostname is successfully resolved into an IPv4 address. More... | |
virtual bool | OnNameResolvedV6 (const AString &a_Name, const sockaddr_in6 *a_IP) |
Called when the hostname is successfully resolved into an IPv6 address. More... | |
virtual | ~cResolveNameCallbacks () |
|
inlinevirtual |
|
pure virtual |
Called when an error is encountered while resolving.
If an error is reported, the OnFinished() callback is not called.
Implemented in cUDPSendAfterLookup, and cLuaNameLookup.
|
pure virtual |
Called when all the addresses resolved have been reported via the OnNameResolved() callback.
Only called if there was no error reported.
Implemented in cUDPSendAfterLookup, and cLuaNameLookup.
|
pure virtual |
Called when the hostname is successfully resolved into an IP address.
May be called multiple times if a name resolves to multiple addresses. a_IP may be either an IPv4 or an IPv6 address with their proper formatting. Each call to OnNameResolved() is preceded by a call to either OnNameResolvedV4() or OnNameResolvedV6().
Implemented in cUDPSendAfterLookup, and cLuaNameLookup.
|
inlinevirtual |
Called when the hostname is successfully resolved into an IPv4 address.
May be called multiple times if a name resolves to multiple addresses. Each call to OnNameResolvedV4 is followed by OnNameResolved with the IP address serialized to a string. If this callback returns false, the OnNameResolved() call is skipped for this address.
Reimplemented in cUDPSendAfterLookup.
|
inlinevirtual |
Called when the hostname is successfully resolved into an IPv6 address.
May be called multiple times if a name resolves to multiple addresses. Each call to OnNameResolvedV4 is followed by OnNameResolved with the IP address serialized to a string. If this callback returns false, the OnNameResolved() call is skipped for this address.
Reimplemented in cUDPSendAfterLookup.