1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-10-31 23:30:25 +03:00

SFTP: use multiple outgoing packets when writing

sftp_write was rewritten to split up outgoing data into multiple packets
and deal with the acks in a more asynchronous manner. This is meant to
help overcome latency and round-trip problems with the SFTP protocol.
This commit is contained in:
Daniel Stenberg
2010-10-25 01:43:54 +02:00
parent d87562976a
commit 59f74de157
2 changed files with 159 additions and 47 deletions

View File

@@ -556,6 +556,7 @@ struct _LIBSSH2_SFTP_HANDLE
struct _libssh2_sftp_handle_file_data
{
libssh2_uint64_t offset;
libssh2_uint64_t offset_sent;
} file;
struct _libssh2_sftp_handle_dir_data
{
@@ -569,6 +570,10 @@ struct _LIBSSH2_SFTP_HANDLE
libssh2_nonblocking_states close_state;
unsigned long close_request_id;
unsigned char *close_packet;
/* list of chunks being written to server */
struct list_head write_list;
};
struct _LIBSSH2_SFTP