DatagramSocketInformation
DatagramSocketInformation
DatagramSocketInformation
DatagramSocketInformation
Class
Definition
Provides socket information on a DatagramSocket object.
public : sealed class DatagramSocketInformation : IDatagramSocketInformationpublic sealed class DatagramSocketInformation : IDatagramSocketInformationPublic NotInheritable Class DatagramSocketInformation Implements IDatagramSocketInformation// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
Remarks
The DatagramSocketInformation class provides information about a DatagramSocket. This class retrieves information on a DatagramSocket and can be called any time after the DatagramSocket has been created.
A DatagramSocketInformation object is automatically created with the parent DatagramSocket object . The DatagramSocket.Information property provides access to the associated DatagramSocketInformation object.
Properties
LocalAddress LocalAddress LocalAddress LocalAddress
The local IP address associated with a DatagramSocket object.
public : HostName LocalAddress { get; }public HostName LocalAddress { get; }Public ReadOnly Property LocalAddress As HostName// You can use this property in JavaScript.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
Remarks
The LocalAddress property represents the local IP address bound to the DatagramSocket object.
An app can set the local hostname or IP address to use by calling the BindEndpointAsync , ConnectAsync(EndpointPair) , or GetOutputStreamAsync(EndpointPair) methods on the DatagramSocket. The bind or connect operation will bind the socket to the specific local IP address and local UDP port number. After the bind or connect operation completes, LocalAddress property contains the IP address and the LocalPort property contains the local UDP port number that the local hostname and service name resolved to.
If the local hostname or IP address passed to the BindEndpointAsync , BindServiceNameAsync, ConnectAsync(EndpointPair) , or GetOutputStreamAsync(EndpointPair) methods is null or the ConnectAsync(HostName, String) or GetOutputStreamAsync(HostName, String) method is called, the system will determine the local IP address to bind to the DatagramSocket object.
- See Also
LocalPort LocalPort LocalPort LocalPort
The local service name or UDP port number associated with a DatagramSocket.
public : PlatForm::String LocalPort { get; }public string LocalPort { get; }Public ReadOnly Property LocalPort As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The local service name or UDP port number.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
Remarks
The LocalPort property represents the local service name or UDP port number bound to the DatagramSocket object.
An app can set the local service name or UDP port number to use by calling the BindEndpointAsync , BindServiceNameAsync, ConnectAsync(EndpointPair) , or GetOutputStreamAsync(EndpointPair) methods on the DatagramSocket. The bind or connect operation will bind the socket to the specific local IP address and local UDP port number. After the bind or connect operation completes, LocalAddress property contains the IP address and the LocalPort property contains the local UDP port number that the local hostname and service name resolved to.
If the local service name or UDP port number passed to the BindEndpointAsync , BindServiceNameAsync, ConnectAsync(EndpointPair) , or GetOutputStreamAsync(EndpointPair) methods is an empty string or the ConnectAsync(HostName, String) or GetOutputStreamAsync(HostName, String) method is called, the system will determine the local UDP port to bind to the DatagramSocket object.
- See Also
RemoteAddress RemoteAddress RemoteAddress RemoteAddress
The IP address of the remote network destination associated with a DatagramSocket object.
public : HostName RemoteAddress { get; }public HostName RemoteAddress { get; }Public ReadOnly Property RemoteAddress As HostName// You can use this property in JavaScript.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
Remarks
The RemoteAddress property represents the remote IP address 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 RemoteAddress property is the IP address that remote hostname resolved to.
- See Also
RemotePort RemotePort RemotePort RemotePort
The UDP port number of the remote network destination associated with a DatagramSocket object.
public : PlatForm::String RemotePort { get; }public string RemotePort { get; }Public ReadOnly Property RemotePort As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The UDP port number of the remote network destination.
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
ID_CAP_NETWORKING [Windows Phone]
|
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.
- See Also