lib: send eos flag

Adds a `bool eos` flag to send methods to indicate that the data is the
last chunk the invovled transfer wants to send to the server.

This will help protocol filters like HTTP/2 and 3 to forward the
stream's EOF flag and also allow to EAGAIN such calls when buffers are
not yet fully flushed.

Closes #14220
This commit is contained in:
Stefan Eissing 2024-07-18 11:29:37 +02:00 committed by Daniel Stenberg
parent c98f6fcde7
commit be93299f10
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
41 changed files with 200 additions and 166 deletions

View file

@ -119,7 +119,7 @@ size_t Curl_hyper_send(void *userp, hyper_context *ctx,
DEBUGF(infof(data, "Curl_hyper_send(%zu)", buflen));
result = Curl_conn_send(data, io_ctx->sockindex,
(void *)buf, buflen, &nwrote);
(void *)buf, buflen, FALSE, &nwrote);
if(result == CURLE_AGAIN) {
DEBUGF(infof(data, "Curl_hyper_send(%zu) -> EAGAIN", buflen));
/* would block, register interest */