nsIDNSRecord

IID:31c9c52e-1100-457d-abac-d2729e43f506
Inherits From:nsISupports
Added:New since Mozilla 1.4

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 --> gila.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

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.

Add a note User Contributed Notes
No comments available

Copyright © 1999 - 2005 XULPlanet.com