Condividi tramite


Socket.Port Property

Definition

Returns the remote port number to which this socket is connected.

public virtual int Port { [Android.Runtime.Register("getPort", "()I", "GetGetPortHandler")] get; }
[<get: Android.Runtime.Register("getPort", "()I", "GetGetPortHandler")>]
member this.Port : int

Property Value

the remote port number to which this socket is connected, or 0 if the socket is not connected yet.

Attributes

Remarks

Returns the remote port number to which this socket is connected.

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

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

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