Skip to content

RemotePort Property

The RemotePort property is a scalar integer in the range 1-65536 that identifies the port number associated with a service on a remote computer.

RemotePort 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.

You can 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, RemotePort is determined by the port number of the connecting process and is a read-only property.

Application

Objects: TCPSocket