mirror of
https://github.com/curl/curl.git
synced 2026-08-25 02:43:33 +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
|
|
@ -2404,12 +2404,13 @@ static CURLcode scp_done(struct Curl_easy *data, CURLcode status,
|
|||
}
|
||||
|
||||
static ssize_t scp_send(struct Curl_easy *data, int sockindex,
|
||||
const void *mem, size_t len, CURLcode *err)
|
||||
const void *mem, size_t len, bool eos, CURLcode *err)
|
||||
{
|
||||
int rc;
|
||||
struct connectdata *conn = data->conn;
|
||||
(void) sockindex; /* we only support SCP on the fixed known primary socket */
|
||||
(void) err;
|
||||
(void)eos;
|
||||
|
||||
rc = ssh_scp_write(conn->proto.sshc.scp_session, mem, len);
|
||||
|
||||
|
|
@ -2552,11 +2553,13 @@ static CURLcode sftp_done(struct Curl_easy *data, CURLcode status,
|
|||
|
||||
/* return number of sent bytes */
|
||||
static ssize_t sftp_send(struct Curl_easy *data, int sockindex,
|
||||
const void *mem, size_t len, CURLcode *err)
|
||||
const void *mem, size_t len, bool eos,
|
||||
CURLcode *err)
|
||||
{
|
||||
ssize_t nwrite;
|
||||
struct connectdata *conn = data->conn;
|
||||
(void)sockindex;
|
||||
(void)eos;
|
||||
|
||||
/* limit the writes to the maximum specified in Section 3 of
|
||||
* https://datatracker.ietf.org/doc/html/draft-ietf-secsh-filexfer-02
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue