- Using the libssh2 0.19 function libssh2_session_block_directions(), libcurl

now has an improved ability to do right when the multi interface (both
  "regular" and multi_socket) is used for SCP and SFTP transfers. This should
  result in (much) less busy-loop situations and thus less CPU usage with no
  speed loss.
This commit is contained in:
Daniel Stenberg
2008-12-19 21:14:52 +00:00
parent 000a13e21a
commit 07416b61e3
14 changed files with 158 additions and 22 deletions

View File

@@ -559,6 +559,8 @@ struct ssh_conn {
LIBSSH2_CHANNEL *ssh_channel; /* Secure Shell channel handle */
LIBSSH2_SFTP *sftp_session; /* SFTP handle */
LIBSSH2_SFTP_HANDLE *sftp_handle;
int waitfor; /* current READ/WRITE bits to wait for */
int orig_waitfor; /* default READ/WRITE bits wait for */
#endif /* USE_LIBSSH2 */
};
@@ -850,6 +852,13 @@ struct Curl_handler {
curl_socket_t *socks,
int numsocks);
/* Called from the multi interface during the DO_DONE, PERFORM and
WAITPERFORM phases, and it should then return a proper fd set. Not setting
this will make libcurl use the generic default one. */
int (*perform_getsock)(const struct connectdata *conn,
curl_socket_t *socks,
int numsocks);
/* This function *MAY* be set to a protocol-dependent function that is run
* by the curl_disconnect(), as a step in the disconnection.
*/