StreamSocketInformation.RemoteAddress Property

Definition

Get the IP address or hostname of the remote network destination associated with a StreamSocket object.

public:
 property HostName ^ RemoteAddress { HostName ^ get(); };
HostName RemoteAddress();
public HostName RemoteAddress { get; }
var hostName = streamSocketInformation.remoteAddress;
Public ReadOnly Property RemoteAddress As HostName

Property Value

The IP address of the remote network endpoint after a connection is established.

Windows requirements

App capabilities
ID_CAP_NETWORKING [Windows Phone]

Remarks

The RemoteHostName property represents the remote hostname or IP address for the remote network destination associated with a StreamSocket object. The RemoteServiceName property represents the remote service name or TCP port number for the remote network destination associated with a StreamSocket object. The RemoteHostName and RemoteServiceName properties are passed to the ConnectAsync method on the StreamSocket to establish a connection.

After a connection is established, the RemoteAddress property contains the IP address and the RemotePort property contains the TCP port number of the remote endpoint for the socket connection. Before a connection is established, the RemoteAddress property is null and the RemotePort property contains an empty string.

Applies to

See also