LocalPort Property  

Return the port number for the local connection.




The LocalPort property is used to return the port number assigned to the client when a connection was established to the server. The local port number is automatically allocated by the operating system, and typically is in a range between 1024 and 5000.

Data Type

Integer (Int32)

See Also

LocalAddress Property, LocalName Property, RemotePort Property