mirror of
https://github.com/curl/curl.git
synced 2026-08-02 19:00:28 +03:00
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:
parent
c98f6fcde7
commit
be93299f10
41 changed files with 200 additions and 166 deletions
|
|
@ -1449,13 +1449,15 @@ static void win_update_sndbuf_size(struct cf_socket_ctx *ctx)
|
|||
#endif /* USE_WINSOCK */
|
||||
|
||||
static ssize_t cf_socket_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
const void *buf, size_t len, CURLcode *err)
|
||||
const void *buf, size_t len, bool eos,
|
||||
CURLcode *err)
|
||||
{
|
||||
struct cf_socket_ctx *ctx = cf->ctx;
|
||||
curl_socket_t fdsave;
|
||||
ssize_t nwritten;
|
||||
size_t orig_len = len;
|
||||
|
||||
(void)eos; /* unused */
|
||||
*err = CURLE_OK;
|
||||
fdsave = cf->conn->sock[cf->sockindex];
|
||||
cf->conn->sock[cf->sockindex] = ctx->sock;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue