nsIDNSService

IID:98519315-f139-405e-9182-3339907c29fd
Inherits From:nsISupports

This interface is implemented by the following components:


Properties

readonly AUTF8String myHostName


Methods

nsIDNSRequest asyncResolve ( AUTF8String hostName , PRBool bypassCache , nsIDNSListener listener , nsIEventQueue listenerEventQ ) void init ( ) nsIDNSRecord resolve ( AUTF8String hostName , PRBool bypassCache ) void shutdown ( )

nsIDNSRequest asyncResolve ( AUTF8String hostName , PRBool bypassCache , nsIDNSListener listener , nsIEventQueue listenerEventQ )

Kicks off an asynchronous host lookup.

Arguments:
hostName: the hostname or IP-address-literal to resolve.
bypassCache: if true, the internal DNS lookup cache will be bypassed.
listener: the listener to be notified when the result is available.
listenerEventQ: optional parameter (may be null). if non-null, this parameter specifies the nsIEventQueue 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:
DNS request instance that can be used to cancel the host lookup.

void init ( )

Called to initialize the DNS service.


nsIDNSRecord resolve ( AUTF8String hostName , PRBool bypassCache )

Called to synchronously resolve a hostname.

Arguments:
hostName: the hostname or IP-address-literal to resolve.
bypassCache: if true, the internal DNS lookup cache will be bypassed.
Returns:
DNS record corresponding to the given hostname.

void shutdown ( )

Called to shutdown the DNS service. any pending asynchronous requests will be canceled, and the local cache of DNS records will be cleared. NOTE: the operating system may still have its own cache of DNS records, which would be unaffected by this method.

Reference documentation is generated from Mozilla's source.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com