Added in API level 29
Callback
interface Callback<T : Any!>
android.net.DnsResolver.Callback |
Base interface for answer callbacks
Summary
Public methods | |
---|---|
abstract Unit |
Success response to android. |
abstract Unit |
onError(error: DnsResolver.DnsException) Error response to android. |
Public methods
onAnswer
Added in API level 29
abstract fun onAnswer(
answer: T,
rcode: Int
): Unit
Success response to android.net.DnsResolver#query or android.net.DnsResolver#rawQuery. Invoked when the answer to a query was successfully parsed.
Parameters | |
---|---|
answer |
T: answer to the query. This value cannot be null . |
rcode |
Int: The response code in the DNS response. |
See Also
onError
Added in API level 29
abstract fun onError(error: DnsResolver.DnsException): Unit
Error response to android.net.DnsResolver#query or android.net.DnsResolver#rawQuery. Invoked when there is no valid answer to android.net.DnsResolver#query android.net.DnsResolver#rawQuery.
Parameters | |
---|---|
error |
DnsResolver.DnsException: a DnsException object with additional detail regarding the failure This value cannot be null . |