RemotePortName Property
Applies To: TCPSocket

Description

The RemotePortName property is a character vector that specifies the port name of the remote service to which you wish to make a connection.

RemotePortName may only be specified by a client TCPSocket that is intended to make a connection with a server. Furthermore, it must be specified in the ⎕WC statement that creates the TCPSocket object and it may not subsequently be changed using ⎕WS.

When the specified port name has been resolved to a port number, the TCPSocket will generate a TCPGotPort event and update the value of RemotePort accordingly.

Note that you may use either RemotePort or RemotePortName to identify the remote service. If you know the port number, it is normally quicker to specify RemotePort. However unless it is a well known port number, the use of a port name is generally more flexible. If you specify both properties, the value of RemotePortName will be ignored.

For a server TCPSocket, you may not specify RemotePortName and ⎕WG returns an empty character vector.