Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Peer initial window size #123

Merged
merged 3 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

* Update for latest http-semantics
[#122](https://github.com/kazu-yamamoto/http2/pull/122)
*
* Measuring performance concurrently for h2c-client

## 5.2.3

Expand Down
16 changes: 1 addition & 15 deletions Network/HTTP2/H2/Context.hs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ newContext rinfo Config{..} cacheSiz connRxWS settings =
-- Peer: The spec defines max concurrency is infinite unless
-- SETTINGS_MAX_CONCURRENT_STREAMS is exchanged.
-- But it is vulnerable, so we set the limitations.
<*> newIORef settings
<*> newIORef baseSettings{maxConcurrentStreams = Just defaultMaxStreams}
<*> newTVarIO emptyOddStreamTable
<*> newTVarIO (emptyEvenStreamTable cacheSiz)
<*> newIORef Nothing
Expand Down Expand Up @@ -133,20 +133,6 @@ newContext rinfo Config{..} cacheSiz connRxWS settings =
| confBufferSize >= dlim = dlim
| otherwise = confBufferSize

makeMySettingsList :: Config -> Int -> WindowSize -> [(SettingsKey, Int)]
makeMySettingsList Config{..} maxConc winSiz = myInitialAlist
where
-- confBufferSize is the size of the write buffer.
-- But we assume that the size of the read buffer is the same size.
-- So, the size is announced to via SETTINGS_MAX_FRAME_SIZE.
len = confBufferSize - frameHeaderLength
payloadLen = max defaultPayloadLength len
myInitialAlist =
[ (SettingsMaxFrameSize, payloadLen)
, (SettingsMaxConcurrentStreams, maxConc)
, (SettingsInitialWindowSize, winSiz)
]

----------------------------------------------------------------

isClient :: Context -> Bool
Expand Down
Loading