cf-socket: make socket data_pending a nop

Eliminating the socket readability check in the socket connection
filters for the 'data_pending' callback. Improves performance of
handling of transfers, up to ~30%, depending on parallelism and response
size.

Whatever `data_pending()` once was, its semantics are now:
"Is there anything buffered in the connection filters that needs
 receive?"
Any checks of the socket's readability are done via `multi_wait()`
and friends.

Fix the one place in HTTP/1 proxy code that checked `data_pending()` and
did an early return if false. Remove that check and actually try to
receive data every time.

Closes #17785
This commit is contained in:
Stefan Eissing 2025-06-30 08:53:31 +02:00 committed by Daniel Stenberg
parent a487a4e4bd
commit 21ecc7e376
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
5 changed files with 116 additions and 85 deletions

View file

@ -374,9 +374,6 @@ static CURLcode recv_CONNECT_resp(struct Curl_cfilter *cf,
error = SELECT_OK;
*done = FALSE;
if(!Curl_conn_data_pending(data, cf->sockindex))
return CURLE_OK;
while(ts->keepon) {
size_t nread;
char byte;