mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:41:40 +03:00
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:
parent
9325eb5fc4
commit
f50446f6da
13 changed files with 78 additions and 79 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue