Skip to content
Myr

Honour 'local_flow_control_window' (#98)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Tom Christie · committed by GitHub · parent 87e199e · Browse files · 1 file+7 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−3 removed

  • other:+7 added−3 removed

1 file+7 added−3 removed

modified:http3/dispatch/http2.py+7 added-3 removed
93 unmodified lines
9495 async def send_data(96 self, stream_id: int, data: bytes, timeout: TimeoutConfig = None97 ) -> None:98 flow_control = self.h2_state.local_flow_control_window(stream_id)99 chunk_size = min(len(data), flow_control)100 for idx in range(0, len(data), chunk_size):101 chunk = data[idx:idx+chunk_size]98 self.h2_state.send_data(stream_id, data)99 data_to_send = self.h2_state.data_to_send()100 await self.writer.write(data_to_send, timeout)102 self.h2_state.send_data(stream_id, chunk)103 data_to_send = self.h2_state.data_to_send()104 await self.writer.write(data_to_send, timeout)105106 async def end_stream(self, stream_id: int, timeout: TimeoutConfig = None) -> None:107 self.h2_state.end_stream(stream_id)108 data_to_send = self.h2_state.data_to_send()
37 unmodified lines