WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIDNSRecord

IID:31c9c52e-1100-457d-abac-d2729e43f506
Inherits From:nsISupports

This interface represents the result of a DNS lookup. since a DNS query may return more than one resolved IP address, the record acts like an enumerator, allowing the caller to easily step through the list of IP addresses.


Properties

readonly ACString canonicalName

E.g., www.mozilla.org --> rheet.mozilla.org


Methods

[noscript] PRNetAddr getNextAddr ( PRUint16 port ) ACString getNextAddrAsString ( ) PRBool hasMore ( ) void rewind ( )

PRNetAddr getNextAddr ( PRUint16 port )

This function copies the value of the next IP address into the given PRNetAddr struct and increments the internal address iterator.

Arguments:
port: A port number to initialize the PRNetAddr with.

ACString getNextAddrAsString ( )

This function returns the value of the next IP address as a string and increments the internal address iterator.


PRBool hasMore ( )

This function returns true if there is another address in the record.


void rewind ( )

This function resets the internal address iterator to the first address in the record.


References

This interface is passed as an argument to the following methods:

nsIDNSListener.onLookupComplete

This interface is returned from the following methods:

nsIDNSService.resolve

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com