adjustMaxBytesPerGatheringWrite() — netty Function Reference
Architecture documentation for the adjustMaxBytesPerGatheringWrite() function in NioSocketChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD b2b75b55_1e03_c82a_0faf_e7985b8f9efa["adjustMaxBytesPerGatheringWrite()"] f2eb70be_1f76_3e54_0854_050839fa58d4["NioSocketChannel"] b2b75b55_1e03_c82a_0faf_e7985b8f9efa -->|defined in| f2eb70be_1f76_3e54_0854_050839fa58d4 bb6558b5_8b8b_7f6e_4aa7_c7dc82285c63["doWrite()"] bb6558b5_8b8b_7f6e_4aa7_c7dc82285c63 -->|calls| b2b75b55_1e03_c82a_0faf_e7985b8f9efa a45573d5_9ffc_26b4_c57e_c71e1d5aee51["setMaxBytesPerGatheringWrite()"] b2b75b55_1e03_c82a_0faf_e7985b8f9efa -->|calls| a45573d5_9ffc_26b4_c57e_c71e1d5aee51 style b2b75b55_1e03_c82a_0faf_e7985b8f9efa fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java lines 365–376
private void adjustMaxBytesPerGatheringWrite(int attempted, int written, int oldMaxBytesPerGatheringWrite) {
// By default we track the SO_SNDBUF when ever it is explicitly set. However some OSes may dynamically change
// SO_SNDBUF (and other characteristics that determine how much data can be written at once) so we should try
// make a best effort to adjust as OS behavior changes.
if (attempted == written) {
if (attempted << 1 > oldMaxBytesPerGatheringWrite) {
((NioSocketChannelConfig) config).setMaxBytesPerGatheringWrite(attempted << 1);
}
} else if (attempted > MAX_BYTES_PER_GATHERING_WRITE_ATTEMPTED_LOW_THRESHOLD && written < attempted >>> 1) {
((NioSocketChannelConfig) config).setMaxBytesPerGatheringWrite(attempted >>> 1);
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does adjustMaxBytesPerGatheringWrite() do?
adjustMaxBytesPerGatheringWrite() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java.
Where is adjustMaxBytesPerGatheringWrite() defined?
adjustMaxBytesPerGatheringWrite() is defined in transport/src/main/java/io/netty/channel/socket/nio/NioSocketChannel.java at line 365.
What does adjustMaxBytesPerGatheringWrite() call?
adjustMaxBytesPerGatheringWrite() calls 1 function(s): setMaxBytesPerGatheringWrite.
What calls adjustMaxBytesPerGatheringWrite()?
adjustMaxBytesPerGatheringWrite() is called by 1 function(s): doWrite.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free