| 2131 | } |
| 2132 | |
| 2133 | void |
| 2134 | Http2ConnectionState::update_initial_local_rwnd(Http2WindowSize new_size) |
| 2135 | { |
| 2136 | // Update stream level window sizes |
| 2137 | for (Http2Stream *s = stream_list.head; s; s = static_cast<Http2Stream *>(s->link.next)) { |
| 2138 | SCOPED_MUTEX_LOCK(lock, s->mutex, this_ethread()); |
| 2139 | // Set the new window size, but take into account the already adjusted |
| 2140 | // window based on previously sent bytes. |
| 2141 | // |
| 2142 | // For example: |
| 2143 | // 1. ATS initializes the stream window to 10K bytes. |
| 2144 | // 2. ATS receives 3K bytes from the client. The stream window is now 7K bytes. |
| 2145 | // 3. ATS sends a SETTINGS frame to the client to update the initial window size to 20K bytes. |
| 2146 | // 4. The stream window should be updated to 17K bytes: 20K - (10K - 7K). |
| 2147 | // |
| 2148 | // Note that if ATS reduces the stream window, this may result in negative |
| 2149 | // receive window values. |
| 2150 | s->set_local_rwnd(new_size - (acknowledged_local_settings.get(HTTP2_SETTINGS_INITIAL_WINDOW_SIZE) - s->get_local_rwnd())); |
| 2151 | } |
| 2152 | } |
| 2153 | |
| 2154 | void |
| 2155 | Http2ConnectionState::schedule_stream_to_send_priority_frames(Http2Stream *stream) |
no test coverage detected