mirror of
https://github.com/curl/curl.git
synced 2026-08-24 21:13:40 +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
|
|
@ -1250,7 +1250,7 @@ CURLcode Curl_xfer_write_done(struct Curl_easy *data, bool premature)
|
|||
}
|
||||
|
||||
CURLcode Curl_xfer_send(struct Curl_easy *data,
|
||||
const void *buf, size_t blen,
|
||||
const void *buf, size_t blen, bool eos,
|
||||
size_t *pnwritten)
|
||||
{
|
||||
CURLcode result;
|
||||
|
|
@ -1267,7 +1267,7 @@ CURLcode Curl_xfer_send(struct Curl_easy *data,
|
|||
} */
|
||||
sockindex = ((data->conn->writesockfd != CURL_SOCKET_BAD) &&
|
||||
(data->conn->writesockfd == data->conn->sock[SECONDARYSOCKET]));
|
||||
result = Curl_conn_send(data, sockindex, buf, blen, pnwritten);
|
||||
result = Curl_conn_send(data, sockindex, buf, blen, eos, pnwritten);
|
||||
if(result == CURLE_AGAIN) {
|
||||
result = CURLE_OK;
|
||||
*pnwritten = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue