multi: more efficient pollfd count for poll

- do not use separate pollfds for sockets that have POLLIN+POLLOUT

Closes #11792
This commit is contained in:
Stefan Eissing 2023-09-04 09:55:27 +02:00 committed by Daniel Stenberg
parent 331b89a319
commit 519b1cf97b
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 45 additions and 71 deletions

View file

@ -59,6 +59,9 @@ struct Curl_multi *Curl_multi_handle(int hashsize, int chashsize,
/* set the bit for the given sock number to make the bitmap for readable */
#define GETSOCK_READSOCK(x) (1 << (x))
/* mask for checking if read and/or write is set for index x */
#define GETSOCK_MASK_RW(x) (GETSOCK_READSOCK(x)|GETSOCK_WRITESOCK(x))
#ifdef DEBUGBUILD
/*
* Curl_multi_dump is not a stable public function, this is only meant to