-api-id | -api-type |
---|---|
P:Windows.Networking.Sockets.StreamSocketInformation.RemoteServiceName |
winrt property |
Get the service name or TCP port number of the remote network destination associated with a StreamSocket object.
The service name or TCP port number of the remote network destination.
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.
How to use advanced socket controls, ConnectAsync, RemoteAddress, RemoteHostName, RemotePort, StreamSocket
ID_CAP_NETWORKING [Windows Phone]