The set_max_stream_data() function currently uses stream-level Flow Control values only (fc.available(), fc.update(limit)).
I propose moving this to self.avail(), which is total available (min of stream FC, connection FC, TX buffer).
Note that later maybe_emit_writable_event() uses self.avail() and compares it to the low-water mark.
This improves consistency and maintainability of the code.
The set_max_stream_data() function currently uses stream-level Flow Control values only (fc.available(), fc.update(limit)).
I propose moving this to self.avail(), which is total available (min of stream FC, connection FC, TX buffer).
Note that later maybe_emit_writable_event() uses self.avail() and compares it to the low-water mark.
This improves consistency and maintainability of the code.