Condividi tramite


DatagramSocket.LocalAddress Property

Definition

Gets the local address to which the socket is bound.

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

Property Value

the local address to which the socket is bound, null if the socket is closed, or an InetAddress representing InetAddress#isAnyLocalAddress wildcard address if either the socket is not bound, or the security manager checkConnect method does not allow the operation

Attributes

Remarks

Gets the local address to which the socket is bound.

If there is a security manager, its checkConnect method is first called with the host address and -1 as its arguments to see if the operation is allowed.

Added in 1.1.

Java documentation for java.net.DatagramSocket.getLocalAddress().

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