1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

- Constantine Sapuntzakis filed bug report #2783090

(http://curl.haxx.se/bug/view.cgi?id=2783090) pointing out that on windows
  we need to grow the SO_SNDBUF buffer somewhat to get really good upload
  speeds. http://support.microsoft.com/kb/823764 has the details. Friends
  confirmed that simply adding 32 to CURL_MAX_WRITE_SIZE is enough.
This commit is contained in:
Daniel Stenberg 2009-04-28 20:27:06 +00:00
parent d576be58dc
commit d068001102
3 changed files with 31 additions and 1 deletions

View File

@ -7,6 +7,12 @@
Changelog Changelog
Daniel Stenberg (28 Apr 2009) Daniel Stenberg (28 Apr 2009)
- Constantine Sapuntzakis filed bug report #2783090
(http://curl.haxx.se/bug/view.cgi?id=2783090) pointing out that on windows
we need to grow the SO_SNDBUF buffer somewhat to get really good upload
speeds. http://support.microsoft.com/kb/823764 has the details. Friends
confirmed that simply adding 32 to CURL_MAX_WRITE_SIZE is enough.
- Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim - Bug report #2709004 (http://curl.haxx.se/bug/view.cgi?id=2709004) by Tim
Chen pointed out how curl couldn't upload with resume when reading from a Chen pointed out how curl couldn't upload with resume when reading from a
pipe. pipe.

View File

@ -34,6 +34,7 @@ This release includes the following bugfixes:
o --libcurl bogus strings where other data was pointed to o --libcurl bogus strings where other data was pointed to
o crash related to FTP and "Re-used connection seems dead, get a new one" o crash related to FTP and "Re-used connection seems dead, get a new one"
o CURLINFO_APPCONNECT_TIME with the multi interface o CURLINFO_APPCONNECT_TIME with the multi interface
o Enhanced upload speeds on Windows
This release includes the following known bugs: This release includes the following known bugs:
@ -46,6 +47,6 @@ advice from friends like these:
Andre Guibert de Bruet, Andreas Farber, Frank Hempel, Pierre Brico, Andre Guibert de Bruet, Andreas Farber, Frank Hempel, Pierre Brico,
Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo, Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo,
Pramod Sharma, Gisle Vanem, Leanic Lefever, Rainer Koenig, Sven Wegener, Pramod Sharma, Gisle Vanem, Leanic Lefever, Rainer Koenig, Sven Wegener,
Tim Chen Tim Chen, Constantine Sapuntzakis
Thanks! (and sorry if I forgot to mention someone) Thanks! (and sorry if I forgot to mention someone)

View File

@ -704,6 +704,27 @@ static void nosigpipe(struct connectdata *conn,
#define nosigpipe(x,y) #define nosigpipe(x,y)
#endif #endif
#ifdef WIN32
/* When you run a program that uses the Windows Sockets API, you may
experience slow performance when you copy data to a TCP server.
http://support.microsoft.com/kb/823764
Work-around: Make the Socket Send Buffer Size Larger Than the Program Send
Buffer Size
*/
static void sndbufset(struct connectdata *conn,
curl_socket_t sockfd)
{
int val = CURL_MAX_WRITE_SIZE + 32;
setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&val, sizeof(val));
}
#else
#define sndbufset(x,y)
#endif
/* singleipconnect() connects to the given IP only, and it may return without /* singleipconnect() connects to the given IP only, and it may return without
having connected if used from the multi interface. */ having connected if used from the multi interface. */
static curl_socket_t static curl_socket_t
@ -807,6 +828,8 @@ singleipconnect(struct connectdata *conn,
nosigpipe(conn, sockfd); nosigpipe(conn, sockfd);
sndbufset(conn, sockfd);
if(data->set.fsockopt) { if(data->set.fsockopt) {
/* activate callback for setting socket options */ /* activate callback for setting socket options */
error = data->set.fsockopt(data->set.sockopt_client, error = data->set.fsockopt(data->set.sockopt_client,