Sdílet prostřednictvím


Socket.RemoteSocketAddress Property

Definition

Returns the address of the endpoint this socket is connected to, or null if it is unconnected.

public virtual Java.Net.SocketAddress? RemoteSocketAddress { [Android.Runtime.Register("getRemoteSocketAddress", "()Ljava/net/SocketAddress;", "GetGetRemoteSocketAddressHandler")] get; }
[<get: Android.Runtime.Register("getRemoteSocketAddress", "()Ljava/net/SocketAddress;", "GetGetRemoteSocketAddressHandler")>]
member this.RemoteSocketAddress : Java.Net.SocketAddress

Property Value

a SocketAddress representing the remote endpoint of this socket, or null if it is not connected yet.

Attributes

Remarks

Returns the address of the endpoint this socket is connected to, or null if it is unconnected.

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

Added in 1.4.

Java documentation for java.net.Socket.getRemoteSocketAddress().

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