NAME

DNS::Unbound::AsyncQuery

SYNOPSIS

my $dns = DNS::Unbound->new();

my $query = $dns->resolve_async( 'example.com', 'A' );

# Ordinary ES6 Promise semantics:
$query->then( .. )->then( .. );

$query->cancel();

DESCRIPTION

This object represents the result of an asynchronous DNS::Unbound query. It subclasses Promise::ES6 but provides a cancellation mechanism.

The promise resolves with a DNS::Unbound::Result instance. It rejects with a DNS::Unbound::X::ResolveError instance that describes the failure.

METHODS

In addition to the methods inherited from Promise::ES6, this class provides:

OBJ->cancel()

Cancels an in-progress DNS query. Returns nothing.