doWrite() — netty Function Reference
Architecture documentation for the doWrite() function in EpollDomainDatagramChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3097a55a_0d29_2543_f00c_0bdde3cddd90["doWrite()"] 7202d69c_3d79_83a7_24dc_27b53c2f5789["EpollDomainDatagramChannel"] 3097a55a_0d29_2543_f00c_0bdde3cddd90 -->|defined in| 7202d69c_3d79_83a7_24dc_27b53c2f5789 441f6996_462b_cce7_ce87_8bf40d88c1be["doWriteMessage()"] 3097a55a_0d29_2543_f00c_0bdde3cddd90 -->|calls| 441f6996_462b_cce7_ce87_8bf40d88c1be style 3097a55a_0d29_2543_f00c_0bdde3cddd90 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDomainDatagramChannel.java lines 112–153
@Override
protected void doWrite(ChannelOutboundBuffer in) throws Exception {
int maxMessagesPerWrite = maxMessagesPerWrite();
while (maxMessagesPerWrite > 0) {
Object msg = in.current();
if (msg == null) {
break;
}
try {
boolean done = false;
for (int i = config().getWriteSpinCount(); i > 0; --i) {
if (doWriteMessage(msg)) {
done = true;
break;
}
}
if (done) {
in.remove();
maxMessagesPerWrite--;
} else {
break;
}
} catch (IOException e) {
maxMessagesPerWrite--;
// Continue on write error as a DatagramChannel can write to multiple remote peers
//
// See https://github.com/netty/netty/issues/2665
in.remove(e);
}
}
if (in.isEmpty()) {
// Did write all messages.
clearFlag(Native.EPOLLOUT);
} else {
// Did not write all messages.
setFlag(Native.EPOLLOUT);
}
}
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does doWrite() do?
doWrite() is a function in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDomainDatagramChannel.java.
Where is doWrite() defined?
doWrite() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/EpollDomainDatagramChannel.java at line 112.
What does doWrite() call?
doWrite() calls 1 function(s): doWriteMessage.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free