Home / Function/ write() — netty Function Reference

write() — netty Function Reference

Architecture documentation for the write() function in CmsgHdr.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  1007e84c_8778_80fb_a244_5d8ea3ab00a6["write()"]
  111a3db5_f15e_0e90_7c29_bf659eb23b98["CmsgHdr"]
  1007e84c_8778_80fb_a244_5d8ea3ab00a6 -->|defined in| 111a3db5_f15e_0e90_7c29_bf659eb23b98
  style 1007e84c_8778_80fb_a244_5d8ea3ab00a6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport-classes-io_uring/src/main/java/io/netty/channel/uring/CmsgHdr.java lines 34–46

    static void write(ByteBuffer cmsghdr, int cmsgHdrDataOffset,
                      int cmsgLen, int cmsgLevel, int cmsgType, short segmentSize) {
        int cmsghdrPosition = cmsghdr.position();
        if (Native.SIZEOF_SIZE_T == 4) {
            cmsghdr.putInt(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_LEN, cmsgLen);
        } else {
            assert Native.SIZEOF_SIZE_T == 8;
            cmsghdr.putLong(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_LEN, cmsgLen);
        }
        cmsghdr.putInt(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_LEVEL, cmsgLevel);
        cmsghdr.putInt(cmsghdrPosition + Native.CMSG_OFFSETOF_CMSG_TYPE, cmsgType);
        cmsghdr.putShort(cmsghdrPosition + cmsgHdrDataOffset, segmentSize);
    }

Domain

Subdomains

Frequently Asked Questions

What does write() do?
write() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/CmsgHdr.java.
Where is write() defined?
write() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/CmsgHdr.java at line 34.

Analyze Your Own Codebase

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

Try Supermodel Free