1. 26 Sep, 2014 1 commit
    • Tatsuhiro Tsujikawa's avatar
      Clear 2 types of stream deferred flag indenpendently · be0f6dca
      Tatsuhiro Tsujikawa authored
      Previously when nghttp2_stream_resume_deferred_data() is called,
      deferred flags in stream->flags are all cleared.  This is not ideal
      because if application returned NGHTTP2_ERR_DEFERRED, and also that
      stream is deferred by flow control, then all flags are cleared and
      read callback will be invoked again.  This commit fixes this issue.
      This changes error condition of nghttp2_session_resume_data().
      Previously we return error if stream was deferred by flow control.
      Now we don't return error in this case.  We just clear
      NGHTTP2_FLAG_DEFERRED_USER and if still
      NGHTTP2_FLAG_DEFERRED_FLOW_CONTROL is set, just return 0.
      be0f6dca
  2. 25 Sep, 2014 2 commits
    • Tatsuhiro Tsujikawa's avatar
      Update doc · 937bb9f7
      Tatsuhiro Tsujikawa authored
      937bb9f7
    • Tatsuhiro Tsujikawa's avatar
      Optimize connection level remote flow control · a11fbf6e
      Tatsuhiro Tsujikawa authored
      Previously when connection level remote flow control window gets 0, we
      mark the stream having DATA frame with
      NGHTTP2_STREAM_FLAG_DEFERRED_FLOW_CONTROL.  When connection level
      WINDOW_UPDATE is received, we checks all existing streams, including
      closed ones, and call nghttp2_stream_resume_deferred_data().  The
      profiler shows this is expensive.
      
      Now we prepare dedicated priority queue for DATA frames.  And we don't
      mark stream with NGHTTP2_STREAM_FLAG_DEFERRED_FLOW_CONTROL when DATA
      cannot be sent solely due to connection level flow control.  Instead,
      we just queue DATA item to queue.  We won't pop DATA item from queue
      when connection level remote window size is 0.  This way, we avoid the
      expensive operation for all streams when WINDOW_UPDATE is arrived.
      a11fbf6e
  3. 24 Sep, 2014 5 commits
  4. 23 Sep, 2014 7 commits
  5. 18 Sep, 2014 5 commits
  6. 17 Sep, 2014 4 commits
  7. 16 Sep, 2014 1 commit
  8. 14 Sep, 2014 2 commits
  9. 13 Sep, 2014 2 commits
    • Tatsuhiro Tsujikawa's avatar
    • Tatsuhiro Tsujikawa's avatar
      Add nghttp2_option_set_recv_client_preface() · 901de5fb
      Tatsuhiro Tsujikawa authored
      By default, nghttp2 library only handles HTTP/2 frames and does not
      recognize first 24 bytes of client connection preface. This design
      choice is done due to the fact that server may want to detect the
      application protocol based on first few bytes on clear text
      communication. But for simple servers which only speak HTTP/2, it is
      easier for developers if nghttp2 library takes care of client
      connection preface.
      
      If this option is used with nonzero val, nghttp2 library checks first
      24 bytes client connection preface. If it is not a valid one,
      nghttp2_session_recv() and nghttp2_session_mem_recv() will return
      error NGHTTP2_ERR_BAD_PREFACE, which is fatal error.
      901de5fb
  10. 10 Sep, 2014 3 commits
  11. 01 Sep, 2014 1 commit
  12. 29 Aug, 2014 4 commits
  13. 28 Aug, 2014 3 commits