curl-curl/lib/vssh
Stefan Eissing 779937f840
multi: add dirty bitset
Add a bitset `dirty` to the multi handle. The presence of a transfer int
he "dirty" set means: this transfer has something to do ASAP.

"dirty" is set by multiplexing protocols like HTTP/2 and 3 when
encountering response data for another transfer than the current one.
"dirty" is set by protocols that want to be called.

Implementation:

* just an additional `uint_bset` in the multi handle
* `Curl_multi_mark_dirty()` to add a transfer to the dirty set.
* `multi_runsingle()` clears the dirty bit of the transfer at
   start. Without new dirty marks, this empties the set after
   al dirty transfers have been run.
* `multi_timeout()` immediately gives the current time and
   timeout_ms == 0 when dirty transfers are present.
* multi_event: marks all transfers tracked for a socket as dirty.
  Then marks all expired transfers as dirty. Then it runs
  all dirty transfers.

With this mechanism:

* Most uses of `EXPIRE_RUN_NOW` are replaced by `Curl_multi_mark_dirty()`
* `Curl_multi_mark_dirty()` is cheaper than querying if a transfer is
  already dirty or set for timeout. There is no need to check, just do it.
* `data->state.select_bits` is eliminated. We need no longer to
  simulate a poll event to make a transfer run.

Closes #17662
2025-06-21 17:19:11 +02:00
..
.checksrc checksrc: use 'banfunc' proper in more places 2025-01-13 09:10:58 +01:00
curl_path.c curl_path: make SFTP handle a path like /~ properly. 2025-06-09 11:23:16 +02:00
curl_path.h lib: include files using known path 2025-04-08 17:00:00 +02:00
libssh2.c multi: add dirty bitset 2025-06-21 17:19:11 +02:00
libssh.c multi: add dirty bitset 2025-06-21 17:19:11 +02:00
ssh.h libssh2: remove the 'actualcode' struct field 2025-05-16 14:56:59 +02:00
wolfssh.c multi: add dirty bitset 2025-06-21 17:19:11 +02:00