Go to file
rcombs d2a7d7c185
multi: implement wait using winsock events
This avoids using a pair of TCP ports to provide wakeup functionality
for every multi instance on Windows, where socketpair() is emulated
using a TCP socket on loopback which could in turn lead to socket
resource exhaustion.

A previous version of this patch failed to account for how in WinSock,
FD_WRITE is set only once when writing becomes possible and not again
until after a send has failed due to the buffer filling. This contrasts
to how FD_READ and FD_OOB continue to be set until the conditions they
refer to no longer apply. This meant that if a user wrote some data to
a socket, but not enough data to completely fill its send buffer, then
waited on that socket to become writable, we'd erroneously stall until
their configured timeout rather than returning immediately.

This version of the patch addresses that issue by checking each socket
we're waiting on to become writable with select() before the wait, and
zeroing the timeout if it's already writable.

Assisted-by: Marc Hörsken
Reviewed-by: Marcel Raad
Reviewed-by: Daniel Stenberg
Tested-by: Gergely Nagy
Tested-by: Rasmus Melchior Jacobsen
Tested-by: Tomas Berger

Replaces #5397
Reverts #5632
Closes #5634
2020-08-25 12:11:24 +02:00
.github TLS naming: fix more Winssl and Darwinssl leftovers 2020-08-08 00:19:21 +02:00
.muse CI: Add muse CI config 2020-08-04 09:52:52 +02:00
CMake content_encoding: add zstd decoding support 2020-07-12 18:11:37 +02:00
docs docs: --output-dir is added in 7.73.0, nothing else 2020-08-24 22:49:32 +02:00
include sftp: add the option CURLKHSTAT_FINE_REPLACE 2020-08-24 17:26:08 +02:00
lib multi: implement wait using winsock events 2020-08-25 12:11:24 +02:00
m4 configure: allow disabling warnings 2020-07-17 09:35:16 +02:00
packages TLS naming: fix more Winssl and Darwinssl leftovers 2020-08-08 00:19:21 +02:00
plan9
projects win32: Add Curl_verify_windows_version() to curlx 2020-08-02 17:58:44 +02:00
scripts scripts/copyright.pl: ignore .muse files 2020-08-14 10:20:05 +02:00
src curl: add --output-dir 2020-08-24 22:41:37 +02:00
tests curl: add --output-dir 2020-08-24 22:41:37 +02:00
winbuild TLS naming: fix more Winssl and Darwinssl leftovers 2020-08-08 00:19:21 +02:00
.azure-pipelines.yml CI/azure: show runtime stats to investigate slowness 2020-08-09 15:30:27 +02:00
.cirrus.yml cirrus-ci: upgrade 11-STABLE to 11.4 2020-07-11 02:42:54 -04:00
.dcignore .dcignore: ignore tests and docs directories 2020-06-27 00:07:37 +02:00
.dir-locals.el
.gitattributes
.gitignore .gitignore: add directory containing the stats repo 2020-06-05 19:54:34 +02:00
.lgtm.yml
.mailmap mailmap: Nicolas Sterchele 2020-06-12 13:41:52 +02:00
.travis.yml travis: add ppc64le and s390x builds 2020-07-31 23:33:57 +02:00
acinclude.m4 build: fixed build for systems with select() in unistd.h 2020-03-31 10:59:06 +02:00
appveyor.yml TLS naming: fix more Winssl and Darwinssl leftovers 2020-08-08 00:19:21 +02:00
buildconf buildconf: retire ares buildconf invocation 2020-08-01 00:00:37 +02:00
buildconf.bat
CHANGES
CMakeLists.txt CMake: don't complain about missing nroff 2020-08-16 11:31:25 +02:00
configure.ac configure: fix pkg-config detecting wolfssl 2020-08-24 19:21:20 +02:00
COPYING
curl-config.in curl-config: ignore REQUIRE_LIB_DEPS in --libs output 2020-08-14 10:22:28 +02:00
GIT-INFO
libcurl.pc.in libcurl.pc: Merge Libs.private into Libs for static-only builds 2020-05-12 08:53:12 +02:00
MacOSX-Framework TLS naming: fix more Winssl and Darwinssl leftovers 2020-08-08 00:19:21 +02:00
Makefile.am dist: add missing CMake Find modules to the distribution 2020-08-21 00:12:55 +02:00
Makefile.dist
maketgz
README docs: change "web site" to "website" 2020-08-17 00:14:18 +02:00
README.md docs: change "web site" to "website" 2020-08-17 00:14:18 +02:00
RELEASE-NOTES RELEASE-NOTES: synced 2020-08-24 17:02:16 +02:00
SECURITY.md SECURITY.md: minor rephrase 2020-03-30 08:53:25 +02:00

curl logo

CII Best Practices Coverity passed Travis-CI Build Status AppVeyor Build Status Azure DevOps Build Status Cirrus Build Status Backers on Open Collective Sponsors on Open Collective Language Grade: C/C++ Codacy Badge Fuzzing Status

Curl is a command-line tool for transferring data specified with URL syntax. Find out how to use curl by reading the curl.1 man page or the MANUAL document. Find out how to install Curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl.3 man page to learn how!

You can find answers to the most frequent questions we get in the FAQ document.

Study the COPYING file for distribution terms and similar. If you distribute curl binaries or other binaries that involve libcurl, you might enjoy the LICENSE-MIXING document.

Contact

If you have problems, questions, ideas or suggestions, please contact us by posting to a suitable mailing list.

All contributors to the project are listed in the THANKS document.

Website

Visit the curl website for the latest news and downloads.

Git

To download the very latest source from the Git server do this:

git clone https://github.com/curl/curl.git

(you'll get a directory named curl created, filled with the source code)

Security problems

Report suspected security problems via our HackerOne page and not in public!

Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]