Public Member Functions | Public Attributes

nsIDNSService Interface Reference

nsIDNSService More...

import "nsIDNSService.idl";

Inheritance diagram for nsIDNSService:

List of all members.

Public Member Functions

nsICancelable asyncResolve (in AUTF8String aHostName, in unsigned long aFlags, in nsIDNSListener aListener, in nsIEventTarget aListenerTarget)
 kicks off an asynchronous host lookup.
nsIDNSRecord resolve (in AUTF8String aHostName, in unsigned long aFlags)
 called to synchronously resolve a hostname.

Public Attributes

readonly attribute AUTF8String myHostName
const unsigned long RESOLVE_BYPASS_CACHE = (1 << 0)
 if set, this flag suppresses the internal DNS lookup cache.
const unsigned long RESOLVE_CANONICAL_NAME = (1 << 1)
 if set, the canonical name of the specified host will be queried.
const unsigned long RESOLVE_PRIORITY_MEDIUM = (1 << 2)
 if set, the query is given lower priority.
const unsigned long RESOLVE_PRIORITY_LOW = (1 << 3)
const unsigned long RESOLVE_SPECULATE = (1 << 4)
 if set, indicates request is speculative.

Detailed Description

nsIDNSService


Member Function Documentation

nsICancelable nsIDNSService::asyncResolve ( in AUTF8String  aHostName,
in unsigned long  aFlags,
in nsIDNSListener  aListener,
in nsIEventTarget  aListenerTarget 
)

kicks off an asynchronous host lookup.

Parameters:
aHostName the hostname or IP-address-literal to resolve.
aFlags a bitwise OR of the RESOLVE_ prefixed constants defined below.
aListener the listener to be notified when the result is available.
aListenerTarget optional parameter (may be null). if non-null, this parameter specifies the nsIEventTarget of the thread on which the listener's onLookupComplete should be called. however, if this parameter is null, then onLookupComplete will be called on an unspecified thread (possibly recursively).
Returns:
An object that can be used to cancel the host lookup.
nsIDNSRecord nsIDNSService::resolve ( in AUTF8String  aHostName,
in unsigned long  aFlags 
)

called to synchronously resolve a hostname.

warning this method may block the calling thread for a long period of time. it is extremely unwise to call this function on the UI thread of an application.

Parameters:
aHostName the hostname or IP-address-literal to resolve.
aFlags a bitwise OR of the RESOLVE_ prefixed constants defined below.
Returns:
DNS record corresponding to the given hostname.
Exceptions:
NS_ERROR_UNKNOWN_HOST if host could not be resolved.

Member Data Documentation

readonly attribute AUTF8String nsIDNSService::myHostName
Returns:
the hostname of the operating system.
const unsigned long nsIDNSService::RESOLVE_BYPASS_CACHE = (1 << 0)

if set, this flag suppresses the internal DNS lookup cache.

const unsigned long nsIDNSService::RESOLVE_CANONICAL_NAME = (1 << 1)

if set, the canonical name of the specified host will be queried.

const unsigned long nsIDNSService::RESOLVE_PRIORITY_LOW = (1 << 3)
const unsigned long nsIDNSService::RESOLVE_PRIORITY_MEDIUM = (1 << 2)

if set, the query is given lower priority.

Medium takes precedence if both are used.

const unsigned long nsIDNSService::RESOLVE_SPECULATE = (1 << 4)

if set, indicates request is speculative.

Speculative requests return errors if prefetching is disabled by configuration.


The documentation for this interface was generated from the following file: