takeInflows attempts to take n bytes from two inflows, typically connection-level and stream-level flows. It reports whether both windows have available capacity.
(f1, f2 *inflow, n uint32)
| 66 | // typically connection-level and stream-level flows. |
| 67 | // It reports whether both windows have available capacity. |
| 68 | func takeInflows(f1, f2 *inflow, n uint32) bool { |
| 69 | if n > uint32(f1.avail) || n > uint32(f2.avail) { |
| 70 | return false |
| 71 | } |
| 72 | f1.avail -= int32(n) |
| 73 | f2.avail -= int32(n) |
| 74 | return true |
| 75 | } |
| 76 | |
| 77 | // outflow is the outbound flow control window's size. |
| 78 | type outflow struct { |
no outgoing calls
searching dependent graphs…