Returns the local port number to which this socket is bound.
If the socket was bound prior to being closed, then this method will continue to return the local port number after the socket is closed.
closed
Returns: the local port number to which this socket is bound or -1 if the socket is not bound yet.
Diagram: Socket