Repository: netty/netty
File: codec-classes-quic/src/main/java/io/netty/handler/codec/quic/Quiche.java (Java)

Code before:
    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.7.0/include/quiche.h#L334">
     *     quiche_conn_peer_streams_left_uni</a>.
     */
    static native long quiche_conn_peer_streams_left_uni(long connAddr);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.7.0/include/quiche.h#L275">quiche_conn_stream_priority</a>.
     */
    static native int quiche_conn_stream_priority(
            long connAddr, long streamId, byte urgency, boolean incremental);

    static native int quiche_conn_send_quantum(long connAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.7.0/include/quiche.h#L309">quiche_conn_trace_id</a>.
     */
    static native byte @Nullable [] quiche_conn_trace_id(long connAddr);

    static native byte[] quiche_conn_source_id(long connAddr);

    static native byte[] quiche_conn_destination_id(long connAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L258">quiche_conn_stream_recv</a>.
     */
    static native int quiche_conn_stream_recv(long connAddr, long streamId, long outAddr, int bufLen, long finAddr,
                                              long outErrorCodeAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L262">quiche_conn_stream_send</a>.
     */
    static native int quiche_conn_stream_send(long connAddr, long streamId, long bufAddr, int bufLen, boolean fin);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L271">quiche_conn_stream_shutdown</a>.
     */
    static native int quiche_conn_stream_shutdown(long connAddr, long streamId, int direction, long err);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L274">quiche_conn_stream_capacity</a>.
     */
    static native long quiche_conn_stream_capacity(long connAddr, long streamId);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L277">quiche_conn_stream_finished</a>.
     */

Review comment (suggestion):
Consider also upgrading the href as it points to a version that does not support the extra pointer argument atm

Code after:
    static native long quiche_conn_peer_streams_left_bidi(long connAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.7.0/include/quiche.h#L334">
     *     quiche_conn_peer_streams_left_uni</a>.
     */
    static native long quiche_conn_peer_streams_left_uni(long connAddr);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.7.0/include/quiche.h#L275">quiche_conn_stream_priority</a>.
     */
    static native int quiche_conn_stream_priority(
            long connAddr, long streamId, byte urgency, boolean incremental);

    static native int quiche_conn_send_quantum(long connAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.7.0/include/quiche.h#L309">quiche_conn_trace_id</a>.
     */
    static native byte @Nullable [] quiche_conn_trace_id(long connAddr);

    static native byte[] quiche_conn_source_id(long connAddr);

    static native byte[] quiche_conn_destination_id(long connAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.24.5/quiche/include/quiche.h#L397">
     *     quiche_conn_stream_recv</a>.
     */
    static native int quiche_conn_stream_recv(long connAddr, long streamId, long outAddr, int bufLen, long finAddr,
                                              long outErrorCodeAddr);

    /**
     * See <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L262">quiche_conn_stream_send</a>.
     */
    static native int quiche_conn_stream_send(long connAddr, long streamId, long bufAddr, int bufLen, boolean fin);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L271">quiche_conn_stream_shutdown</a>.
     */
    static native int quiche_conn_stream_shutdown(long connAddr, long streamId, int direction, long err);

    /**
     * See
     * <a href="https://github.com/cloudflare/quiche/blob/0.6.0/include/quiche.h#L274">quiche_conn_stream_capacity</a>.
     */
    static native long quiche_conn_stream_capacity(long connAddr, long streamId);

    /**