writable() — netty Function Reference
Architecture documentation for the writable() function in QuicheQuicStreamChannel.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d301ee1d_af2b_6e2c_115e_64e0b50ea9cb["writable()"] 12c209e0_2392_3384_a39f_2a0649fbd28b["QuicheQuicStreamChannel"] d301ee1d_af2b_6e2c_115e_64e0b50ea9cb -->|defined in| 12c209e0_2392_3384_a39f_2a0649fbd28b 1123715f_0f63_323f_9bab_77f6d3c50fff["close()"] d301ee1d_af2b_6e2c_115e_64e0b50ea9cb -->|calls| 1123715f_0f63_323f_9bab_77f6d3c50fff da5c2828_c8c5_6172_4f45_d61e57ed89ae["writeQueued()"] d301ee1d_af2b_6e2c_115e_64e0b50ea9cb -->|calls| da5c2828_c8c5_6172_4f45_d61e57ed89ae 0fb16511_4393_9f1f_b70d_71245985b6aa["updateWritabilityIfNeeded()"] d301ee1d_af2b_6e2c_115e_64e0b50ea9cb -->|calls| 0fb16511_4393_9f1f_b70d_71245985b6aa style d301ee1d_af2b_6e2c_115e_64e0b50ea9cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java lines 415–443
boolean writable(long capacity) {
assert eventLoop().inEventLoop();
if (capacity < 0) {
// If the value is negative its a quiche error.
if (capacity != Quiche.QUICHE_ERR_DONE) {
if (!queue.isEmpty()) {
if (capacity == Quiche.QUICHE_ERR_STREAM_STOPPED) {
queue.removeAndFailAll(new ChannelOutputShutdownException("STOP_SENDING frame received"));
// If STOP_SENDING is received we should not close the channel but just fail all queued writes.
return false;
} else {
queue.removeAndFailAll(Quiche.convertToException((int) capacity));
}
} else if (capacity == Quiche.QUICHE_ERR_STREAM_STOPPED) {
// If STOP_SENDING is received we should not close the channel
return false;
}
// IF this error was not QUICHE_ERR_STREAM_STOPPED we should close the channel.
finSent = true;
unsafe().close(unsafe().voidPromise());
}
return false;
}
this.capacity = capacity;
boolean mayNeedWrite = unsafe().writeQueued();
// we need to re-read this.capacity as writeQueued() may update the capacity.
updateWritabilityIfNeeded(this.capacity > 0);
return mayNeedWrite;
}
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does writable() do?
writable() is a function in the netty codebase, defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java.
Where is writable() defined?
writable() is defined in codec-classes-quic/src/main/java/io/netty/handler/codec/quic/QuicheQuicStreamChannel.java at line 415.
What does writable() call?
writable() calls 3 function(s): close, updateWritabilityIfNeeded, writeQueued.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free