Skip to content

Latest commit

 

History

History
39 lines (26 loc) · 2.43 KB

streamsocketinformation_remotehostname.md

File metadata and controls

39 lines (26 loc) · 2.43 KB
-api-id -api-type
P:Windows.Networking.Sockets.StreamSocketInformation.RemoteHostName
winrt property

Windows.Networking.Sockets.StreamSocketInformation.RemoteHostName

-description

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

-property-value

The hostname or IP address of the remote network destination.

-remarks

The RemoteHostName property represents the remote hostname or IP address for the remote network destination associated with a StreamSocket object. The remote hostname or IP address that a StreamSocket object connects to is passed in the remoteHostName parameter to the ConnectAsync method on the StreamSocket.

The RemoteHostName property can be one of the following:

  • The name of the local host that can be resolved by the Domain Name System (DNS) or by another namespace provider.
  • The name of the local host that matches a string in the following file on the local computer: %WINDIR%\system32\drivers\etc\hosts.
  • A string that contains an IPv4 or an IPv6 network address of the local host. An IPv4 address string is in dotted-decimal notation ("192.168.1.111", for example). An IPv6 address is in hexadecimal notation ("21DA:00D3:0010:2F3B:02AA:00FF:FE28:9C5A", for example). When this property is the "localhost" string, this represents all loopback addresses on the local computer.

The RemoteServiceName property represents the remote service name or TCP port number for the remote network destination associated with a StreamSocket object.

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.

-examples

-see-also

ConnectAsync, HostName, RemoteAddress, RemotePort, RemoteServiceName, StreamSocket

-capabilities

ID_CAP_NETWORKING [Windows Phone]