InetAddress.CanonicalHostName Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the fully qualified domain name for this IP address.
public virtual string CanonicalHostName { [Android.Runtime.Register("getCanonicalHostName", "()Ljava/lang/String;", "GetGetCanonicalHostNameHandler")] get; }
[<get: Android.Runtime.Register("getCanonicalHostName", "()Ljava/lang/String;", "GetGetCanonicalHostNameHandler")>]
member this.CanonicalHostName : string
Property Value
the fully qualified domain name for this IP address, or if the operation is not allowed by the security check, the textual representation of the IP address.
- Attributes
Remarks
Gets the fully qualified domain name for this IP address. Best effort method, meaning we may not be able to return the FQDN depending on the underlying system configuration.
If there is a security manager, this method first calls its checkConnect
method with the hostname and -1
as its arguments to see if the calling code is allowed to know the hostname for this IP address, i.e., to connect to the host. If the operation is not allowed, it will return the textual representation of the IP address.
Added in 1.4.
Java documentation for java.net.InetAddress.getCanonicalHostName()
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.