LocalPort
Returns or sets the local port to use. Returns a long with port number in local machine byte-order. Read/Write and available at design time.
-
For the client, this designates the local port from which to send data. Specify port 0 if the application does not need a specific port, in which case, the control will select a random port. After a connection is established, this is the local port used for the TCP connection.
-
For the server, this is the local port to listen on. After invoking the Listen method, the property contains the actual port that has been selected.
Syntax
object.LocalPort = long
Data Type
Long