channelRead0() — netty Function Reference
Architecture documentation for the channelRead0() function in TrafficShapingHandlerTest.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 95e1288e_b36b_7855_418d_399a527d5032["channelRead0()"] 7e6cf114_b36a_90aa_093d_d8e5d1c3e413["ClientHandler"] 95e1288e_b36b_7855_418d_399a527d5032 -->|defined in| 7e6cf114_b36a_90aa_093d_d8e5d1c3e413 3f6bd014_d001_c3a0_8233_056f4ad262a7["channelRead0()"] 3f6bd014_d001_c3a0_8233_056f4ad262a7 -->|calls| 95e1288e_b36b_7855_418d_399a527d5032 3f6bd014_d001_c3a0_8233_056f4ad262a7["channelRead0()"] 95e1288e_b36b_7855_418d_399a527d5032 -->|calls| 3f6bd014_d001_c3a0_8233_056f4ad262a7 style 95e1288e_b36b_7855_418d_399a527d5032 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
testsuite/src/main/java/io/netty/testsuite/transport/socket/TrafficShapingHandlerTest.java lines 464–498
@Override
public void channelRead0(ChannelHandlerContext ctx, ByteBuf in) throws Exception {
long lastTimestamp = 0;
loggerClient.debug("Step: " + step + " Read: " + in.readableBytes() / 8 + " blocks");
while (in.isReadable()) {
lastTimestamp = in.readLong();
multipleMessage[step]--;
}
if (multipleMessage[step] > 0) {
// still some message to get
return;
}
long minimalWait = minimalWaitBetween != null? minimalWaitBetween[step] : 0;
int ar = 0;
if (autoRead != null) {
if (step > 0 && autoRead[step - 1] != 0) {
ar = autoRead[step - 1];
}
}
loggerClient.info("Step: " + step + " Interval: " + (lastTimestamp - currentLastTime) + " compareTo "
+ minimalWait + " (" + ar + ')');
assertTrue(lastTimestamp - currentLastTime >= minimalWait,
"The interval of time is incorrect:" + (lastTimestamp - currentLastTime) + " not> " + minimalWait);
currentLastTime = lastTimestamp;
step++;
if (multipleMessage.length > step) {
int nb = multipleMessage[step];
for (int i = 0; i < nb; i++) {
channel.write(channel.alloc().buffer().writeBytes(data));
}
channel.flush();
} else {
promise.setSuccess(true);
}
}
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does channelRead0() do?
channelRead0() is a function in the netty codebase, defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/TrafficShapingHandlerTest.java.
Where is channelRead0() defined?
channelRead0() is defined in testsuite/src/main/java/io/netty/testsuite/transport/socket/TrafficShapingHandlerTest.java at line 464.
What does channelRead0() call?
channelRead0() calls 1 function(s): channelRead0.
What calls channelRead0()?
channelRead0() is called by 1 function(s): channelRead0.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free