RemotePort | remotePort property
Collapse the table of content
Expand the table of content

DatagramSocketInformation.RemotePort | remotePort property

The UDP port number of the remote network destination associated with a DatagramSocket object.

Syntax


var remotePort = datagramSocketInformation.remotePort;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The UDP port number of the remote network destination.

Remarks

The RemotePort property represents the UDP port number for the remote network destination associated with a DatagramSocket object.

An app can set the remote hostname or IP address and remote service name or UDP port number to use by calling the ConnectAsync or GetOutputStreamAsync method on the DatagramSocket. The connect operation will bind the socket to a specific remote IP address and remote UDP port number. The RemotePort property is the UDP port number the remote service name resolved to.

Requirements (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Capabilities

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

Capabilities

ID_CAP_NETWORKING [Windows Phone]

See also

Other resources
How to use advanced socket controls (HTML)
How to use advanced socket controls (XAML)
Reference
DatagramSocket
DatagramSocket.ConnectAsync
DatagramSocket.GetOutputStreamAsync
DatagramSocketInformation
LocalAddress
LocalPort
RemoteAddress

 

 

Show:
© 2016 Microsoft