Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 2.23 KB

streamsocketinformation_remoteservicename.md

File metadata and controls

37 lines (25 loc) · 2.23 KB
-api-id -api-type
P:Windows.Networking.Sockets.StreamSocketInformation.RemoteServiceName
winrt property

Windows.Networking.Sockets.StreamSocketInformation.RemoteServiceName

-description

Get the service name or TCP port number of the remote network destination associated with a StreamSocket object.

-property-value

The service name or TCP port number of the remote network destination.

-remarks

The RemoteServiceName property represents the remote service name or TCP port number for the remote network destination associated with a StreamSocket object. The remote service name or TCP port that a StreamSocket object connects to is passed in the remoteServiceName parameter to the ConnectAsync method on the StreamSocket.

The RemoteServiceName property can be one of the following:

  • A numeric literal for a TCP port number (80 for the TCP port typically used for the HTTP protocol, for example).
  • A string alias for a port number ("http", for example) that matches a string in the following file on the local computer: %WINDIR%\system32\drivers\etc\services
  • A service name that can be resolved by a namespace provider using a SRV record. The RemoteHostName 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

How to use advanced socket controls, ConnectAsync, RemoteAddress, RemoteHostName, RemotePort, StreamSocket

-capabilities

ID_CAP_NETWORKING [Windows Phone]