-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivaiton: There is no way to define initial values for [http/2 settings](https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2). Modifications: - Enhance H2ProtocolConfigBuilder to accept Map<Character, Integer> to set the initial settings values. - Set the default value of settings with bound max header list size and 1mb default initial flow control window. - Increase flow control quantum to 16kb because the flow control window is larger. This allows streams to write an entire frame per write operation and increases goodput on the connection.
- Loading branch information
1 parent
ee34067
commit ac3ba07
Showing
9 changed files
with
350 additions
and
20 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
servicetalk-http-api/src/main/java/io/servicetalk/http/api/Http2Settings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
/* | ||
* Copyright © 2022 Apple Inc. and the ServiceTalk project authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package io.servicetalk.http.api; | ||
|
||
/** | ||
* Utilities for <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.1">HTTP/2 Setting</a>. | ||
*/ | ||
public final class Http2Settings { | ||
/** | ||
* Identifier <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2">SETTINGS_HEADER_TABLE_SIZE</a>. | ||
*/ | ||
public static final char HEADER_TABLE_SIZE = 0x1; | ||
|
||
/** | ||
* Identifier <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2">SETTINGS_ENABLE_PUSH</a>. | ||
*/ | ||
public static final char ENABLE_PUSH = 0x2; | ||
|
||
/** | ||
* Identifier <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2"> | ||
* SETTINGS_MAX_CONCURRENT_STREAMS</a>. | ||
*/ | ||
public static final char MAX_CONCURRENT_STREAMS = 0x3; | ||
|
||
/** | ||
* Identifier <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2"> | ||
* SETTINGS_INITIAL_WINDOW_SIZE</a>. | ||
*/ | ||
public static final char INITIAL_WINDOW_SIZE = 0x4; | ||
|
||
/** | ||
* Identifier <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2">SETTINGS_MAX_FRAME_SIZE</a>. | ||
*/ | ||
public static final char MAX_FRAME_SIZE = 0x5; | ||
|
||
/** | ||
* Identifier <a href="https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2"> | ||
* SETTINGS_MAX_HEADER_LIST_SIZE</a>. | ||
*/ | ||
public static final char MAX_HEADER_LIST_SIZE = 0x6; | ||
|
||
private Http2Settings() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.