public static int getPort(SocketAddress addr, int defaultValue) {
        if (addr instanceof InetSocketAddress) {
            assert !(addr instanceof DomainSocketAddress) : addr;
            return ((InetSocketAddress) addr).getPort();
        }
        return defaultValue;
    }
Finds the {@link SSLSession} of the current TLS connection.

@return the {@link SSLSession} if found, or {@code null} if not found or {@link Channel} is {@code null}.
core/src/main/java/com/linecorp/armeria/internal/common/util/ChannelUtil.java