DatagramSocket.Port 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.
Returns the 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 port number to which this socket is connected.
- Attributes
Remarks
Returns the port number to which this socket is connected. Returns -1
if the socket is not 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.DatagramSocket.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.