/ curl Public
state.drain counter with
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge.
drainwas used by http/2 and http/3 implementations to indicate that the transfer requires send/recv independant from its socket poll state. Intended as a counter, it was used as bool flag only.
connectdata->cselect_bitswhere specific protocols can indicate something similar, only for the whole connection.
cselect_bitsare cleard in transfer.c on use and, importantly, also set when the transfer loop expended its
drainwas not cleared by transfer and the http2/3 implementations had to take care of that.
dselect_bitsis cleared and set by the transfer loop. http2/3 does no longer clear it, only set when new events happen.
This PR unifies the handling of socket poll overrides, extending
cselect_bitsby a easy handle specific value and a common treatment in transfers.