diff options
author | Mattes D <github@xoft.cz> | 2015-01-11 11:21:18 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-01-22 20:12:45 +0100 |
commit | fde44cba0815f626253c0d352cd0d782eec94328 (patch) | |
tree | a25648d28be80c624b3fea7240c8449991d08564 /src/OSSupport/Network.h | |
parent | Excluded PolarSSL tests from MCS tests. (diff) | |
download | cuberite-fde44cba0815f626253c0d352cd0d782eec94328.tar cuberite-fde44cba0815f626253c0d352cd0d782eec94328.tar.gz cuberite-fde44cba0815f626253c0d352cd0d782eec94328.tar.bz2 cuberite-fde44cba0815f626253c0d352cd0d782eec94328.tar.lz cuberite-fde44cba0815f626253c0d352cd0d782eec94328.tar.xz cuberite-fde44cba0815f626253c0d352cd0d782eec94328.tar.zst cuberite-fde44cba0815f626253c0d352cd0d782eec94328.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/Network.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/OSSupport/Network.h b/src/OSSupport/Network.h index 5cca511dc..3f60b03a7 100644 --- a/src/OSSupport/Network.h +++ b/src/OSSupport/Network.h @@ -148,11 +148,18 @@ public: // Force a virtual destructor for all descendants: virtual ~cResolveNameCallbacks() {} - /** Called when the hostname is successfully resolved into an IP address. */ + /** Called when the hostname is successfully resolved into an IP address. + May be called multiple times if an address resolves to multiple addresses. + a_IP may be either an IPv4 or an IPv6 address with their proper formatting. */ virtual void OnNameResolved(const AString & a_Name, const AString & a_IP) = 0; - /** Called when an error is encountered while resolving. */ + /** Called when an error is encountered while resolving. + If an error is reported, the OnFinished() callback is not called. */ virtual void OnError(int a_ErrorCode) = 0; + + /** Called when all the addresses resolved have been reported via the OnNameResolved() callback. + Only called if there was no error reported. */ + virtual void OnFinished(void) = 0; }; typedef SharedPtr<cResolveNameCallbacks> cResolveNameCallbacksPtr; |