Home / Function/ calculateRecvFlags() — netty Function Reference

calculateRecvFlags() — netty Function Reference

Architecture documentation for the calculateRecvFlags() function in AbstractIoUringStreamChannel.java from the netty codebase.

Function java Buffer Search called by 2

Entity Profile

Dependency Diagram

graph TD
  f3971f93_dbcb_2767_5244_f09d3a29db3d["calculateRecvFlags()"]
  2ef046a1_16aa_1708_4ba7_113c9fa2862e["IoUringStreamUnsafe"]
  f3971f93_dbcb_2767_5244_f09d3a29db3d -->|defined in| 2ef046a1_16aa_1708_4ba7_113c9fa2862e
  59498236_2b4d_5c66_9f07_08c2b7375a6b["scheduleRead0()"]
  59498236_2b4d_5c66_9f07_08c2b7375a6b -->|calls| f3971f93_dbcb_2767_5244_f09d3a29db3d
  fa8d19bc_1143_f4c3_84c4_ef07823cb9be["scheduleReadProviderBuffer()"]
  fa8d19bc_1143_f4c3_84c4_ef07823cb9be -->|calls| f3971f93_dbcb_2767_5244_f09d3a29db3d
  style f3971f93_dbcb_2767_5244_f09d3a29db3d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java lines 305–316

        private int calculateRecvFlags(boolean first) {
            // Depending on if this is the first read or not we will use Native.MSG_DONTWAIT.
            // The idea is that if the socket is blocking we can do the first read in a blocking fashion
            // and so not need to also register POLLIN. As we can not 100 % sure if reads after the first will
            // be possible directly we schedule these with Native.MSG_DONTWAIT. This allows us to still be
            // able to signal the fireChannelReadComplete() in a timely manner and be consistent with other
            // transports.
            if (first) {
                return 0;
            }
            return Native.MSG_DONTWAIT;
        }

Domain

Subdomains

Frequently Asked Questions

What does calculateRecvFlags() do?
calculateRecvFlags() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java.
Where is calculateRecvFlags() defined?
calculateRecvFlags() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java at line 305.
What calls calculateRecvFlags()?
calculateRecvFlags() is called by 2 function(s): scheduleRead0, scheduleReadProviderBuffer.

Analyze Your Own Codebase

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

Try Supermodel Free