lib: keepon improving

Improve the name, type and handling of `data->req.keepon`:

- Rename `keepon` to `io_flags`
- make `io_flags` and `uint8_t` and reposition in struct
- Rename `KEEP_*` defines to `REQ_IO_*`, move to request.h
- Replace all direct bit tests to `CURL_REQ_WANT_*` use
- Replace all direct bit manipulations with new macros

Closes #20905
This commit is contained in:
Stefan Eissing 2026-03-12 11:18:32 +01:00 committed by Daniel Stenberg
parent 9325eb5fc4
commit f50446f6da
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 78 additions and 79 deletions

View file

@ -388,19 +388,6 @@ struct hostname {
const char *dispname; /* name to display, as 'name' might be encoded */
};
/*
* Flags on the keepon member of the Curl_transfer_keeper
*/
#define KEEP_NONE 0
#define KEEP_RECV (1 << 0) /* there is or may be data to read */
#define KEEP_SEND (1 << 1) /* there is or may be data to write */
/* transfer wants to send */
#define CURL_WANT_SEND(data) ((data)->req.keepon & KEEP_SEND)
/* transfer wants to receive */
#define CURL_WANT_RECV(data) ((data)->req.keepon & KEEP_RECV)
#define FIRSTSOCKET 0
#define SECONDARYSOCKET 1