This repository was archived by the owner on Jan 21, 2025. It is now read-only.
Commit 3d3456e
committed
implement in-flight buffer credits and event moderation for large/chunked responses
Referer to #165
Relates to #169
in-flight buffer credits are intended to moderate buffer fill callbacks in AsyncAbstractResponse
it could prevent bad designed slow user-callbacks to flood the queue in chunked responces.
for response data we need to control the queue and in-flight fragmentation. Sending small chunks could give low latency,
but flood asynctcp's queue and fragment socket buffer space for large responses.
Let's ignore polled acks and acks in case when we have more in-flight data then the available socket buff space.
That way we could balance on having half the buffer in-flight while another half is filling up, while minimizing events in asynctcp q1 parent 359cc68 commit 3d3456e
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
355 | 367 | | |
| 368 | + | |
| 369 | + | |
356 | 370 | | |
357 | 371 | | |
358 | 372 | | |
| |||
364 | 378 | | |
365 | 379 | | |
366 | 380 | | |
| 381 | + | |
| 382 | + | |
367 | 383 | | |
368 | 384 | | |
369 | 385 | | |
370 | 386 | | |
371 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
372 | 400 | | |
373 | 401 | | |
374 | 402 | | |
375 | 403 | | |
376 | 404 | | |
| 405 | + | |
377 | 406 | | |
378 | 407 | | |
379 | 408 | | |
| |||
422 | 451 | | |
423 | 452 | | |
424 | 453 | | |
| 454 | + | |
| 455 | + | |
425 | 456 | | |
426 | 457 | | |
427 | 458 | | |
| |||
0 commit comments