Home / Function/ closeOnRead() — netty Function Reference

closeOnRead() — netty Function Reference

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

Function java Buffer Allocators calls 1 called by 2

Entity Profile

Dependency Diagram

graph TD
  0ba407db_98b9_c902_b664_3b3bfa2bab6f["closeOnRead()"]
  77188bb7_e7ad_de01_3b54_5bc50b9e2df1["QuicStreamChannelUnsafe"]
  0ba407db_98b9_c902_b664_3b3bfa2bab6f -->|defined in| 77188bb7_e7ad_de01_3b54_5bc50b9e2df1
  af59efb8_dc8a_4d8b_ff8b_642fc3890db5["handleReadException()"]
  af59efb8_dc8a_4d8b_ff8b_642fc3890db5 -->|calls| 0ba407db_98b9_c902_b664_3b3bfa2bab6f
  08842539_3127_e4fc_3930_f7214f42f664["recv()"]
  08842539_3127_e4fc_3930_f7214f42f664 -->|calls| 0ba407db_98b9_c902_b664_3b3bfa2bab6f
  1123715f_0f63_323f_9bab_77f6d3c50fff["close()"]
  0ba407db_98b9_c902_b664_3b3bfa2bab6f -->|calls| 1123715f_0f63_323f_9bab_77f6d3c50fff
  style 0ba407db_98b9_c902_b664_3b3bfa2bab6f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java lines 910–930

        private void closeOnRead(ChannelPipeline pipeline, boolean readFrames) {
            if (readFrames && finReceived && finSent) {
                close(voidPromise());
            } else if (config.isAllowHalfClosure()) {
                if (finReceived) {
                    // If we receive a fin there will be no more data to read so we need to fire both events
                    // to be consistent with other transports.
                    pipeline.fireUserEventTriggered(ChannelInputShutdownEvent.INSTANCE);
                    pipeline.fireUserEventTriggered(ChannelInputShutdownReadComplete.INSTANCE);
                    if (finSent) {
                        // This was an unidirectional stream which means as soon as we received FIN and sent a FIN
                        // we need close the connection.
                        close(voidPromise());
                    }
                }
            } else {
                // This was an unidirectional stream which means as soon as we received FIN we need
                // close the connection.
                close(voidPromise());
            }
        }

Domain

Subdomains

Calls

Frequently Asked Questions

What does closeOnRead() do?
closeOnRead() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java.
Where is closeOnRead() defined?
closeOnRead() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java at line 910.
What does closeOnRead() call?
closeOnRead() calls 1 function(s): close.
What calls closeOnRead()?
closeOnRead() is called by 2 function(s): handleReadException, recv.

Analyze Your Own Codebase

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

Try Supermodel Free