Sdílet prostřednictvím


ServerSocket.InetAddress Property

Definition

Returns the local address of this server socket.

public virtual Java.Net.InetAddress? InetAddress { [Android.Runtime.Register("getInetAddress", "()Ljava/net/InetAddress;", "GetGetInetAddressHandler")] get; }
[<get: Android.Runtime.Register("getInetAddress", "()Ljava/net/InetAddress;", "GetGetInetAddressHandler")>]
member this.InetAddress : Java.Net.InetAddress

Property Value

the address to which this socket is bound, or the loopback address if denied by the security manager, or null if the socket is unbound.

Attributes

Remarks

Returns the local address of this server socket.

If the socket was bound prior to being #close closed, then this method will continue to return the local address after the socket is closed.

If there is a security manager set, its checkConnect method is called with the local address and -1 as its arguments to see if the operation is allowed. If the operation is not allowed, the InetAddress#getLoopbackAddress loopback address is returned.

Java documentation for java.net.ServerSocket.getInetAddress().

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.

Applies to