scheduleTimeout() — netty Function Reference
Architecture documentation for the scheduleTimeout() function in QuicheQuicChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD c997df20_22da_3c7d_91cc_a980c6a6738b["scheduleTimeout()"] 745f36f6_9a3c_f564_aaaa_aa3880bcb1f5["TimeoutHandler"] c997df20_22da_3c7d_91cc_a980c6a6738b -->|defined in| 745f36f6_9a3c_f564_aaaa_aa3880bcb1f5 9f9da465_f345_60be_84db_446a37063039["SendResult()"] 9f9da465_f345_60be_84db_446a37063039 -->|calls| c997df20_22da_3c7d_91cc_a980c6a6738b 8fc73c0a_1c83_08e3_9486_c99948586794["run()"] 8fc73c0a_1c83_08e3_9486_c99948586794 -->|calls| c997df20_22da_3c7d_91cc_a980c6a6738b b747d616_c157_971c_d76e_49712809b326["cancel()"] c997df20_22da_3c7d_91cc_a980c6a6738b -->|calls| b747d616_c157_971c_d76e_49712809b326 8fc73c0a_1c83_08e3_9486_c99948586794["run()"] c997df20_22da_3c7d_91cc_a980c6a6738b -->|calls| 8fc73c0a_1c83_08e3_9486_c99948586794 style c997df20_22da_3c7d_91cc_a980c6a6738b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicChannel.java lines 2022–2056
void scheduleTimeout() {
QuicheQuicConnection conn = connection;
if (conn.isFreed()) {
cancel();
return;
}
if (conn.isClosed()) {
cancel();
unsafe().close(newPromise());
return;
}
long nanos = Quiche.quiche_conn_timeout_as_nanos(conn.address());
if (nanos < 0 || nanos == Long.MAX_VALUE) {
// No timeout needed.
cancel();
return;
}
if (timeoutFuture == null) {
timeoutFuture = eventLoop().schedule(this,
nanos, TimeUnit.NANOSECONDS);
} else {
long remaining = timeoutFuture.getDelay(TimeUnit.NANOSECONDS);
if (remaining <= 0) {
// This means the timer already elapsed. In this case just cancel the future and call run()
// directly. This will ensure we correctly call quiche_conn_on_timeout() etc.
cancel();
run();
} else if (remaining > nanos) {
// The new timeout is smaller then what was scheduled before. Let's cancel the old timeout
// and schedule a new one.
cancel();
timeoutFuture = eventLoop().schedule(this, nanos, TimeUnit.NANOSECONDS);
}
}
}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does scheduleTimeout() do?
scheduleTimeout() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicChannel.java.
Where is scheduleTimeout() defined?
scheduleTimeout() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicChannel.java at line 2022.
What does scheduleTimeout() call?
scheduleTimeout() calls 2 function(s): cancel, run.
What calls scheduleTimeout()?
scheduleTimeout() is called by 2 function(s): SendResult, run.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free