doWriteBytes() — netty Function Reference
Architecture documentation for the doWriteBytes() function in AbstractEpollChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 3a78ecbb_5c42_2dc1_8b44_50085c9dac8a["doWriteBytes()"] 6a1b1970_2eef_b28f_03e7_8b11508deece["AbstractEpollChannel"] 3a78ecbb_5c42_2dc1_8b44_50085c9dac8a -->|defined in| 6a1b1970_2eef_b28f_03e7_8b11508deece style 3a78ecbb_5c42_2dc1_8b44_50085c9dac8a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport-classes-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollChannel.java lines 377–395
protected final int doWriteBytes(ChannelOutboundBuffer in, ByteBuf buf) throws Exception {
if (buf.hasMemoryAddress()) {
int localFlushedAmount = socket.sendAddress(buf.memoryAddress(), buf.readerIndex(), buf.writerIndex());
if (localFlushedAmount > 0) {
in.removeBytes(localFlushedAmount);
return 1;
}
} else {
final ByteBuffer nioBuf = buf.nioBufferCount() == 1 ?
buf.internalNioBuffer(buf.readerIndex(), buf.readableBytes()) : buf.nioBuffer();
int localFlushedAmount = socket.send(nioBuf, nioBuf.position(), nioBuf.limit());
if (localFlushedAmount > 0) {
nioBuf.position(nioBuf.position() + localFlushedAmount);
in.removeBytes(localFlushedAmount);
return 1;
}
}
return WRITE_STATUS_SNDBUF_FULL;
}
Domain
Subdomains
Source
Frequently Asked Questions
What does doWriteBytes() do?
doWriteBytes() is a function in the netty codebase, defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollChannel.java.
Where is doWriteBytes() defined?
doWriteBytes() is defined in transport-classes-epoll/src/main/java/io/netty/channel/epoll/AbstractEpollChannel.java at line 377.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free