Socket.LocalPort (gb.net)

Property Read LocalPort As Integer

Once a TCP connection is established, this property reflects local port (1-65535) used by this connection.