Xojo.Net.TCPSocket.Port

From Xojo Documentation

Property (As Int32 )
aXojo.Net.TCPSocket.Port = newInt32Value
or
Int32Value = aXojo.Net.TCPSocket.Port

Supported for all project types and targets.

The port to bind on or connect to.

Notes

On most operating systems, attempting to bind on a port less than 1024 (without administrator privileges) causes an Error event. You need to set the port property explicitly before any call to Connect as the Port property is changed to reflect the actual port that the OS has bound to.