Home / Function/ writeQueued() — netty Function Reference

writeQueued() — netty Function Reference

Architecture documentation for the writeQueued() function in QuicheQuicStreamChannel.java from the netty codebase.

Function java Buffer Allocators calls 3 called by 2

Entity Profile

Dependency Diagram

graph TD
  da5c2828_c8c5_6172_4f45_d61e57ed89ae["writeQueued()"]
  77188bb7_e7ad_de01_3b54_5bc50b9e2df1["QuicStreamChannelUnsafe"]
  da5c2828_c8c5_6172_4f45_d61e57ed89ae -->|defined in| 77188bb7_e7ad_de01_3b54_5bc50b9e2df1
  d301ee1d_af2b_6e2c_115e_64e0b50ea9cb["writable()"]
  d301ee1d_af2b_6e2c_115e_64e0b50ea9cb -->|calls| da5c2828_c8c5_6172_4f45_d61e57ed89ae
  3fb93988_b8ac_d344_5a9e_cea0a0997755["write()"]
  3fb93988_b8ac_d344_5a9e_cea0a0997755 -->|calls| da5c2828_c8c5_6172_4f45_d61e57ed89ae
  86200146_0c82_b96d_e3db_5b4ffacfa597["write0()"]
  da5c2828_c8c5_6172_4f45_d61e57ed89ae -->|calls| 86200146_0c82_b96d_e3db_5b4ffacfa597
  0fb16511_4393_9f1f_b70d_71245985b6aa["updateWritabilityIfNeeded()"]
  da5c2828_c8c5_6172_4f45_d61e57ed89ae -->|calls| 0fb16511_4393_9f1f_b70d_71245985b6aa
  02ba6530_dd1d_7e69_71f0_2ab5b91e6586["closeIfNeeded()"]
  da5c2828_c8c5_6172_4f45_d61e57ed89ae -->|calls| 02ba6530_dd1d_7e69_71f0_2ab5b91e6586
  style da5c2828_c8c5_6172_4f45_d61e57ed89ae fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java lines 677–720

        boolean writeQueued() {
            assert eventLoop().inEventLoop();
            boolean wasFinSent = QuicheQuicStreamChannel.this.finSent;
            inWriteQueued = true;
            try {
                if (queue.isEmpty()) {
                    return false;
                }
                boolean written = false;
                for (;;) {
                    Object msg = queue.current();
                    if (msg == null) {
                        break;
                    }
                    try {
                        int res = write0(msg);
                        if (res == 1) {
                            queue.remove().setSuccess();
                            written = true;
                        } else if (res == 0 || res == Quiche.QUICHE_ERR_DONE) {
                            break;
                        } else if (res == Quiche.QUICHE_ERR_STREAM_STOPPED) {
                            // Once its signaled that the stream is stopped we can just fail everything.
                            // That said we should not close the channel yet as there might be some data that is
                            // not read yet by the user.
                            queue.removeAndFailAll(
                                    new ChannelOutputShutdownException("STOP_SENDING frame received"));
                            break;
                        } else {
                            queue.remove().setFailure(Quiche.convertToException(res));
                        }
                    } catch (Exception e) {
                        queue.remove().setFailure(e);
                    }
                }
                if (written) {
                    updateWritabilityIfNeeded(true);
                }
                return written;
            } finally {
                closeIfNeeded(wasFinSent);
                inWriteQueued = false;
            }
        }

Domain

Subdomains

Called By

Frequently Asked Questions

What does writeQueued() do?
writeQueued() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java.
Where is writeQueued() defined?
writeQueued() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java at line 677.
What does writeQueued() call?
writeQueued() calls 3 function(s): closeIfNeeded, updateWritabilityIfNeeded, write0.
What calls writeQueued()?
writeQueued() is called by 2 function(s): writable, write.

Analyze Your Own Codebase

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

Try Supermodel Free