MCPcopy Create free account
hub / github.com/apache/trafficserver / update_initial_peer_rwnd

Method update_initial_peer_rwnd

src/proxy/http2/Http2ConnectionState.cc:2112–2131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2110}
2111
2112void
2113Http2ConnectionState::update_initial_peer_rwnd(Http2WindowSize new_size)
2114{
2115 // Update stream level window sizes
2116 for (Http2Stream *s = stream_list.head; s; s = static_cast<Http2Stream *>(s->link.next)) {
2117 SCOPED_MUTEX_LOCK(lock, s->mutex, this_ethread());
2118 // Set the new window size, but take into account the already adjusted
2119 // window based on previously sent bytes.
2120 //
2121 // For example:
2122 // 1. Client initializes the stream window to 10K bytes.
2123 // 2. ATS sends 3K bytes to the client. The stream window is now 7K bytes.
2124 // 3. The client sends a SETTINGS frame to update the initial window size to 20K bytes.
2125 // 4. ATS should update the stream window to 17K bytes: 20K - (10K - 7K).
2126 //
2127 // Note that if the client reduces the stream window, this may result in
2128 // negative receive window values.
2129 s->set_peer_rwnd(new_size - (peer_settings.get(HTTP2_SETTINGS_INITIAL_WINDOW_SIZE) - s->get_peer_rwnd()));
2130 }
2131}
2132
2133void
2134Http2ConnectionState::update_initial_local_rwnd(Http2WindowSize new_size)

Callers 1

rcv_settings_frameMethod · 0.95

Calls 4

this_ethreadFunction · 0.85
set_peer_rwndMethod · 0.80
getMethod · 0.45
get_peer_rwndMethod · 0.45

Tested by

no test coverage detected