.localport R/O Property


For the currently selected socket (selection is made through sock.num) returns current local port of the socket.



Value Range:

0-65535, default = 0

See Also:



Your application cannot set the local port directly. Instead, a list of ports on which the socket is allowed to accept an incoming connection (passive open) is supplied via the sock.localportlist and sock.httpportlist properties.

An incoming connection is accepted on any port from those two lists. The sock.localport property reflects current or the most recent local port on which connection was accepted.