- 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
Родитель d576be58dc
Коммит d068001102
3 изменённых файлов: 31 добавлений и 1 удалений

Просмотреть файл

@ -7,6 +7,12 @@
Changelog
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
Chen pointed out how curl couldn't upload with resume when reading from a
pipe.

Просмотреть файл

@ -34,6 +34,7 @@ This release includes the following bugfixes:
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 CURLINFO_APPCONNECT_TIME with the multi interface
o Enhanced upload speeds on Windows
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,
Kamil Dudka, Jim Freeman, Daniel Johnson, Toshio Kuratomi, Martin Storsjo,
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)

Просмотреть файл

@ -704,6 +704,27 @@ static void nosigpipe(struct connectdata *conn,
#define nosigpipe(x,y)
#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
having connected if used from the multi interface. */
static curl_socket_t
@ -807,6 +828,8 @@ singleipconnect(struct connectdata *conn,
nosigpipe(conn, sockfd);
sndbufset(conn, sockfd);
if(data->set.fsockopt) {
/* activate callback for setting socket options */
error = data->set.fsockopt(data->set.sockopt_client,