Home / Function/ streamShutdown() — netty Function Reference

streamShutdown() — netty Function Reference

Architecture documentation for the streamShutdown() function in QuicheQuicChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  3a14bc8d_0db0_95b4_1122_575c5fdadd6f["streamShutdown()"]
  3c534d05_bb5b_c991_5e03_7ec94e739cf7["QuicheQuicChannel"]
  3a14bc8d_0db0_95b4_1122_575c5fdadd6f -->|defined in| 3c534d05_bb5b_c991_5e03_7ec94e739cf7
  babedc0a_1d7d_a309_1480_38ccb9d490af["connectionAddressChecked()"]
  3a14bc8d_0db0_95b4_1122_575c5fdadd6f -->|calls| babedc0a_1d7d_a309_1480_38ccb9d490af
  d21171a6_3135_05f4_7ac2_3fd3258ddab8["forceFlushParent()"]
  3a14bc8d_0db0_95b4_1122_575c5fdadd6f -->|calls| d21171a6_3135_05f4_7ac2_3fd3258ddab8
  style 3a14bc8d_0db0_95b4_1122_575c5fdadd6f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicChannel.java lines 843–873

    void streamShutdown(long streamId, boolean read, boolean write, int err, ChannelPromise promise) {
        QuicheQuicConnection conn = this.connection;
        final long connectionAddress;
        try {
            connectionAddress = connectionAddressChecked(conn);
        } catch (ClosedChannelException e) {
            promise.setFailure(e);
            return;
        }
        int res = 0;
        if (read) {
            res |= Quiche.quiche_conn_stream_shutdown(connectionAddress, streamId, Quiche.QUICHE_SHUTDOWN_READ, err);
        }
        if (write) {
            res |= Quiche.quiche_conn_stream_shutdown(connectionAddress, streamId, Quiche.QUICHE_SHUTDOWN_WRITE, err);
        }

        // As we called quiche_conn_stream_shutdown(...) we need to ensure we will call quiche_conn_send(...) either
        // now or we will do so once we see the channelReadComplete event.
        //
        // See https://docs.rs/quiche/0.6.0/quiche/struct.Connection.html#method.send
        if (connectionSend(conn) != SendResult.NONE) {
            // Force the flush so the shutdown can be seen asap.
            forceFlushParent();
        }
        if (res < 0 && res != Quiche.QUICHE_ERR_DONE) {
            promise.setFailure(Quiche.convertToException(res));
        } else {
            promise.setSuccess();
        }
    }

Domain

Subdomains

Frequently Asked Questions

What does streamShutdown() do?
streamShutdown() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicChannel.java.
Where is streamShutdown() defined?
streamShutdown() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicChannel.java at line 843.
What does streamShutdown() call?
streamShutdown() calls 2 function(s): connectionAddressChecked, forceFlushParent.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free