Home / Function/ doWrite() — netty Function Reference

doWrite() — netty Function Reference

Architecture documentation for the doWrite() function in AbstractNioByteChannel.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  a28491f1_6177_d155_eb85_0f25c627fb66["doWrite()"]
  81dd42bf_4dab_740c_6405_14423e9ad1f8["AbstractNioByteChannel"]
  a28491f1_6177_d155_eb85_0f25c627fb66 -->|defined in| 81dd42bf_4dab_740c_6405_14423e9ad1f8
  d90218d8_6da4_9b59_fb11_460b955cc09a["clearOpWrite()"]
  a28491f1_6177_d155_eb85_0f25c627fb66 -->|calls| d90218d8_6da4_9b59_fb11_460b955cc09a
  46da3fe7_43e8_758e_f039_58b516d9c088["incompleteWrite()"]
  a28491f1_6177_d155_eb85_0f25c627fb66 -->|calls| 46da3fe7_43e8_758e_f039_58b516d9c088
  e280c816_366c_4e91_6697_7eba37a14c24["doWriteInternal()"]
  a28491f1_6177_d155_eb85_0f25c627fb66 -->|calls| e280c816_366c_4e91_6697_7eba37a14c24
  style a28491f1_6177_d155_eb85_0f25c627fb66 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java lines 263–278

    @Override
    protected void doWrite(ChannelOutboundBuffer in) throws Exception {
        int writeSpinCount = config().getWriteSpinCount();
        do {
            Object msg = in.current();
            if (msg == null) {
                // Wrote all messages.
                clearOpWrite();
                // Directly return here so incompleteWrite(...) is not called.
                return;
            }
            writeSpinCount -= doWriteInternal(in, msg);
        } while (writeSpinCount > 0);

        incompleteWrite(writeSpinCount < 0);
    }

Domain

Subdomains

Frequently Asked Questions

What does doWrite() do?
doWrite() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java.
Where is doWrite() defined?
doWrite() is defined in transport/src/main/java/io/netty/channel/nio/AbstractNioByteChannel.java at line 263.
What does doWrite() call?
doWrite() calls 3 function(s): clearOpWrite, doWriteInternal, incompleteWrite.

Analyze Your Own Codebase

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

Try Supermodel Free