Home / Function/ add0() — netty Function Reference

add0() — netty Function Reference

Architecture documentation for the add0() function in NativeDatagramPacketArray.java from the netty codebase.

Function java Buffer Search calls 3 called by 2

Entity Profile

Dependency Diagram

graph TD
  3f127df8_c158_c9df_275e_c99e90486d95["add0()"]
  89d8e64d_0d21_7947_7ca7_74069c6c6608["NativeDatagramPacketArray"]
  3f127df8_c158_c9df_275e_c99e90486d95 -->|defined in| 89d8e64d_0d21_7947_7ca7_74069c6c6608
  caf38c70_dc92_8ef9_b463_dbdd2f1d301f["addWritable()"]
  caf38c70_dc92_8ef9_b463_dbdd2f1d301f -->|calls| 3f127df8_c158_c9df_275e_c99e90486d95
  9eecdd2f_216f_e7dc_b481_6ba488dff4af["processMessage()"]
  9eecdd2f_216f_e7dc_b481_6ba488dff4af -->|calls| 3f127df8_c158_c9df_275e_c99e90486d95
  08468dbc_2d10_46fc_a4cd_317c936674e1["count()"]
  3f127df8_c158_c9df_275e_c99e90486d95 -->|calls| 08468dbc_2d10_46fc_a4cd_317c936674e1
  b215023b_7c8c_600d_d61d_48014fe73e1c["add()"]
  3f127df8_c158_c9df_275e_c99e90486d95 -->|calls| b215023b_7c8c_600d_d61d_48014fe73e1c
  ff253642_2eb0_17f7_3ecc_98192434783f["init()"]
  3f127df8_c158_c9df_275e_c99e90486d95 -->|calls| ff253642_2eb0_17f7_3ecc_98192434783f
  style 3f127df8_c158_c9df_275e_c99e90486d95 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-epoll/src/main/java/io/netty/channel/epoll/NativeDatagramPacketArray.java lines 63–82

    private boolean add0(ByteBuf buf, int index, int len, int segmentLen, InetSocketAddress recipient) {
        if (count == packets.length) {
            // We already filled up to UIO_MAX_IOV messages. This is the max allowed per
            // recvmmsg(...) / sendmmsg(...) call, we will try again later.
            return false;
        }
        if (len == 0) {
            return true;
        }
        int offset = iovArray.count();
        if (offset == Limits.IOV_MAX || !iovArray.add(buf, index, len)) {
            // Not enough space to hold the whole content, we will try again later.
            return false;
        }
        NativeDatagramPacket p = packets[count];
        p.init(iovArray.memoryAddress(offset), iovArray.count() - offset, segmentLen, recipient);

        count++;
        return true;
    }

Domain

Subdomains

Frequently Asked Questions

What does add0() do?
add0() is a function in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/NativeDatagramPacketArray.java.
Where is add0() defined?
add0() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/NativeDatagramPacketArray.java at line 63.
What does add0() call?
add0() calls 3 function(s): add, count, init.
What calls add0()?
add0() is called by 2 function(s): addWritable, processMessage.

Analyze Your Own Codebase

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

Try Supermodel Free