onHttpServerUpgrade() — netty Function Reference
Architecture documentation for the onHttpServerUpgrade() function in Http2ConnectionHandler.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD d777a039_1711_835b_0843_da9b11ca161d["onHttpServerUpgrade()"] a9ab361d_2417_0366_d9d0_ae1adb2145dc["Http2ConnectionHandler"] d777a039_1711_835b_0843_da9b11ca161d -->|defined in| a9ab361d_2417_0366_d9d0_ae1adb2145dc 7ac4a90e_d0ae_14a9_10cc_cd77b04bff6c["prefaceSent()"] d777a039_1711_835b_0843_da9b11ca161d -->|calls| 7ac4a90e_d0ae_14a9_10cc_cd77b04bff6c style d777a039_1711_835b_0843_da9b11ca161d fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java lines 170–188
public void onHttpServerUpgrade(Http2Settings settings) throws Http2Exception {
if (!connection().isServer()) {
throw connectionError(PROTOCOL_ERROR, "Server-side HTTP upgrade requested for a client");
}
if (!prefaceSent()) {
// If the preface was not sent yet it most likely means the handler was not added to the pipeline before
// calling this method.
throw connectionError(INTERNAL_ERROR, "HTTP upgrade must occur after preface was sent");
}
if (decoder.prefaceReceived()) {
throw connectionError(PROTOCOL_ERROR, "HTTP upgrade must occur before HTTP/2 preface is received");
}
// Apply the settings but no ACK is necessary.
encoder.remoteSettings(settings);
// Create a stream in the half-closed state.
connection().remote().createStream(HTTP_UPGRADE_STREAM_ID, true);
}
Domain
Subdomains
Calls
Source
Frequently Asked Questions
What does onHttpServerUpgrade() do?
onHttpServerUpgrade() is a function in the netty codebase, defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java.
Where is onHttpServerUpgrade() defined?
onHttpServerUpgrade() is defined in codec-http2/src/main/java/io/netty/handler/codec/http2/Http2ConnectionHandler.java at line 170.
What does onHttpServerUpgrade() call?
onHttpServerUpgrade() calls 1 function(s): prefaceSent.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free