public int port(int defaultValue) {
        return port != 0 ? port : defaultValue;
    }
Returns the port number of this endpoint.

@param defaultValue the default value to return when this endpoint does not have its port specified
core/src/main/java/com/linecorp/armeria/client/Endpoint.java