Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StreamSocketInformation.RemotePort | remotePort property

Applies to Windows and Windows Phone

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

Syntax


var remotePort = streamSocketInformation.remotePort;

Property value

Type: String [JavaScript] | System.String [.NET] | Platform::String [C++]

The TCP port number of the remote network endpoint after a connection is established.

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.Networking.Sockets
Windows::Networking::Sockets [C++]

Metadata

Windows.winmd

DLL

Windows.Networking.dll

Capabilities

ID_CAP_NETWORKING [Windows Phone]

See also

Other resources
How to use advanced socket controls (HTML)
How to use advanced socket controls (XAML)
Reference
ConnectAsync
RemoteAddress
RemoteHostName
RemoteServiceName
StreamSocket
StreamSocketInformation

 

 

Show:
© 2014 Microsoft