| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 723d1af commit 47bf705
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -314,7 +314,7 @@ inline void Nghttp2Stream::Destroy() { | |||
| 314 | 314 | // Do nothing if this stream instance is already destroyed | |
| 315 | 315 | if (IsDestroyed()) | |
| 316 | 316 | return; | |
| 317 | - flags_ |= NGHTTP2_STREAM_DESTROYED; | ||
| 317 | + flags_ |= NGHTTP2_STREAM_FLAG_DESTROYED; | ||
| 318 | 318 | Nghttp2Session* session = this->session_; | |
| 319 | 319 | ||
| 320 | 320 | if (session != nullptr) { | |
@@ -539,8 +539,8 @@ inline void Nghttp2Stream::ReadStart() { | |||
| 539 | 539 | id_, | |
| 540 | 540 | prev_local_window_size_); | |
| 541 | 541 | } | |
| 542 | - flags_ |= NGHTTP2_STREAM_READ_START; | ||
| 543 | - flags_ &= ~NGHTTP2_STREAM_READ_PAUSED; | ||
| 542 | + flags_ |= NGHTTP2_STREAM_FLAG_READ_START; | ||
| 543 | + flags_ &= ~NGHTTP2_STREAM_FLAG_READ_PAUSED; | ||
| 544 | 544 | ||
| 545 | 545 | // Flush any queued data chunks immediately out to the JS layer | |
| 546 | 546 | FlushDataChunks(); | |
@@ -549,11 +549,11 @@ inline void Nghttp2Stream::ReadStart() { | |||
| 549 | 549 | inline void Nghttp2Stream::ReadStop() { | |
| 550 | 550 | DEBUG_HTTP2("Nghttp2Stream %d: stop reading\n", id_); | |
| 551 | 551 | // Has no effect if IsReading() is false, which will happen if we either | |
| 552 | - // have not started reading yet at all (NGHTTP2_STREAM_READ_START is not | ||
| 553 | - // set) or if we're already paused (NGHTTP2_STREAM_READ_PAUSED is set. | ||
| 552 | + // have not started reading yet at all (NGHTTP2_STREAM_FLAG_READ_START is not | ||
| 553 | + // set) or if we're already paused (NGHTTP2_STREAM_FLAG_READ_PAUSED is set. | ||
| 554 | 554 | if (!IsReading()) | |
| 555 | 555 | return; | |
| 556 | - flags_ |= NGHTTP2_STREAM_READ_PAUSED; | ||
| 556 | + flags_ |= NGHTTP2_STREAM_FLAG_READ_PAUSED; | ||
| 557 | 557 | ||
| 558 | 558 | // When not reading, explicitly set the local window size to 0 so that | |
| 559 | 559 | // the peer does not keep sending data that has to be buffered | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -59,13 +59,13 @@ enum nghttp2_stream_flags { | |||
| 59 | 59 | // Writable side has ended | |
| 60 | 60 | NGHTTP2_STREAM_FLAG_SHUT = 0x1, | |
| 61 | 61 | // Reading has started | |
| 62 | - NGHTTP2_STREAM_READ_START = 0x2, | ||
| 62 | + NGHTTP2_STREAM_FLAG_READ_START = 0x2, | ||
| 63 | 63 | // Reading is paused | |
| 64 | - NGHTTP2_STREAM_READ_PAUSED = 0x4, | ||
| 64 | + NGHTTP2_STREAM_FLAG_READ_PAUSED = 0x4, | ||
| 65 | 65 | // Stream is closed | |
| 66 | - NGHTTP2_STREAM_CLOSED = 0x8, | ||
| 66 | + NGHTTP2_STREAM_FLAG_CLOSED = 0x8, | ||
| 67 | 67 | // Stream is destroyed | |
| 68 | - NGHTTP2_STREAM_DESTROYED = 0x10 | ||
| 68 | + NGHTTP2_STREAM_FLAG_DESTROYED = 0x10 | ||
| 69 | 69 | }; | |
| 70 | 70 | ||
| 71 | 71 | ||
@@ -301,7 +301,7 @@ class Nghttp2Stream { | |||
| 301 | 301 | ||
| 302 | 302 | // Returns true if this stream has been destroyed | |
| 303 | 303 | inline bool IsDestroyed() const { | |
| 304 | - return flags_ & NGHTTP2_STREAM_DESTROYED; | ||
| 304 | + return flags_ & NGHTTP2_STREAM_FLAG_DESTROYED; | ||
| 305 | 305 | } | |
| 306 | 306 | ||
| 307 | 307 | // Queue outbound chunks of data to be sent on this stream | |
@@ -361,24 +361,24 @@ class Nghttp2Stream { | |||
| 361 | 361 | ||
| 362 | 362 | // Returns true if reading is paused | |
| 363 | 363 | inline bool IsPaused() const { | |
| 364 | - return flags_ & NGHTTP2_STREAM_READ_PAUSED; | ||
| 364 | + return flags_ & NGHTTP2_STREAM_FLAG_READ_PAUSED; | ||
| 365 | 365 | } | |
| 366 | 366 | ||
| 367 | 367 | inline bool GetTrailers() const { | |
| 368 | 368 | return getTrailers_; | |
| 369 | 369 | } | |
| 370 | 370 | ||
| 371 | 371 | // Returns true if this stream is in the reading state, which occurs when | |
| 372 | - // the NGHTTP2_STREAM_READ_START flag has been set and the | ||
| 373 | - // NGHTTP2_STREAM_READ_PAUSED flag is *not* set. | ||
| 372 | + // the NGHTTP2_STREAM_FLAG_READ_START flag has been set and the | ||
| 373 | + // NGHTTP2_STREAM_FLAG_READ_PAUSED flag is *not* set. | ||
| 374 | 374 | inline bool IsReading() const { | |
| 375 | - return flags_ & NGHTTP2_STREAM_READ_START && | ||
| 376 | - !(flags_ & NGHTTP2_STREAM_READ_PAUSED); | ||
| 375 | + return flags_ & NGHTTP2_STREAM_FLAG_READ_START && | ||
| 376 | + !(flags_ & NGHTTP2_STREAM_FLAG_READ_PAUSED); | ||
| 377 | 377 | } | |
| 378 | 378 | ||
| 379 | 379 | inline void Close(int32_t code) { | |
| 380 | 380 | DEBUG_HTTP2("Nghttp2Stream %d: closing with code %d\n", id_, code); | |
| 381 | - flags_ |= NGHTTP2_STREAM_CLOSED; | ||
| 381 | + flags_ |= NGHTTP2_STREAM_FLAG_CLOSED; | ||
| 382 | 382 | code_ = code; | |
| 383 | 383 | session_->OnStreamClose(id_, code); | |
| 384 | 384 | DEBUG_HTTP2("Nghttp2Stream %d: closed\n", id_); | |
@@ -387,7 +387,7 @@ class Nghttp2Stream { | |||
| 387 | 387 | // Returns true if this stream has been closed either by receiving or | |
| 388 | 388 | // sending an RST_STREAM frame. | |
| 389 | 389 | inline bool IsClosed() const { | |
| 390 | - return flags_ & NGHTTP2_STREAM_CLOSED; | ||
| 390 | + return flags_ & NGHTTP2_STREAM_FLAG_CLOSED; | ||
| 391 | 391 | } | |
| 392 | 392 | ||
| 393 | 393 | // Returns the RST_STREAM code used to close this stream | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -173,7 +173,7 @@ const expectedNGConstants = { | |||
| 173 | 173 | NGHTTP2_INTERNAL_ERROR: 2, | |
| 174 | 174 | NGHTTP2_FLOW_CONTROL_ERROR: 3, | |
| 175 | 175 | NGHTTP2_SETTINGS_TIMEOUT: 4, | |
| 176 | - NGHTTP2_STREAM_CLOSED: 8, | ||
| 176 | + NGHTTP2_STREAM_CLOSED: 5, | ||
| 177 | 177 | NGHTTP2_FRAME_SIZE_ERROR: 6, | |
| 178 | 178 | NGHTTP2_REFUSED_STREAM: 7, | |
| 179 | 179 | NGHTTP2_CANCEL: 8, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments