- 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

@@ -1524,6 +1524,7 @@ static CURLcode readwrite_upload(struct SessionHandle *data,
data->req.upload_fromhere, /* buffer pointer */
data->req.upload_present, /* buffer size */
&bytes_written); /* actually send away */
if(result)
return result;
@@ -1744,6 +1745,9 @@ int Curl_single_getsock(const struct connectdata *conn,
int bitmap = GETSOCK_BLANK;
unsigned sockindex = 0;
if(conn->handler->perform_getsock)
return conn->handler->perform_getsock(conn, sock, numsocks);
if(numsocks < 2)
/* simple check but we might need two slots */
return GETSOCK_BLANK;