Home / Function/ writeComplete0() — netty Function Reference

writeComplete0() — netty Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  883343ab_9c59_4e9f_32b3_d1e64fd67a0e["writeComplete0()"]
  2ef046a1_16aa_1708_4ba7_113c9fa2862e["IoUringStreamUnsafe"]
  883343ab_9c59_4e9f_32b3_d1e64fd67a0e -->|defined in| 2ef046a1_16aa_1708_4ba7_113c9fa2862e
  97d8bd30_3581_f2a7_44ef_aa6255a7a64e["handleWriteCompleteFileRegion()"]
  883343ab_9c59_4e9f_32b3_d1e64fd67a0e -->|calls| 97d8bd30_3581_f2a7_44ef_aa6255a7a64e
  style 883343ab_9c59_4e9f_32b3_d1e64fd67a0e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

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

        @Override
        boolean writeComplete0(byte op, int res, int flags, short data, int outstanding) {
            if ((flags & Native.IORING_CQE_F_NOTIF) == 0) {
                // We only want to reset these if IORING_CQE_F_NOTIF is not set.
                // If it's set we know this is only an extra notification for a write but we already handled
                // the write completions before.
                // See https://man7.org/linux/man-pages/man2/io_uring_enter.2.html section: IORING_OP_SEND_ZC
                writeId = 0;
                writeOpCode = 0;
            }
            ChannelOutboundBuffer channelOutboundBuffer = unsafe().outboundBuffer();
            Object current = channelOutboundBuffer.current();
            if (current instanceof IoUringFileRegion) {
                IoUringFileRegion fileRegion = (IoUringFileRegion) current;
                return handleWriteCompleteFileRegion(channelOutboundBuffer, fileRegion, res, data);
            }

            if (res >= 0) {
                channelOutboundBuffer.removeBytes(res);
            } else if (res == Native.ERRNO_ECANCELED_NEGATIVE) {
                return true;
            } else {
                try {
                    if (ioResult("io_uring write", res) == 0) {
                        return false;
                    }
                } catch (Throwable cause) {
                    handleWriteError(cause);
                }
            }
            return true;
        }

Domain

Subdomains

Frequently Asked Questions

What does writeComplete0() do?
writeComplete0() is a function in the netty codebase, defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java.
Where is writeComplete0() defined?
writeComplete0() is defined in transport-classes-io_uring/src/main/java/io/netty/channel/uring/AbstractIoUringStreamChannel.java at line 585.
What does writeComplete0() call?
writeComplete0() calls 1 function(s): handleWriteCompleteFileRegion.

Analyze Your Own Codebase

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

Try Supermodel Free