summaryrefslogtreecommitdiff
path: root/include/curl/multi.h
Commit message (Collapse)AuthorAgeFilesLines
* defines: avoid underscore-prefixed definesDaniel Stenberg2019-08-231-2/+2
| | | | | | | | | | | Double-underscored or underscore plus uppercase letter at least. ... as they're claimed to be reserved. Reported-by: patnyb on github Fixes #4254 Closes #4255
* curl_multi_poll: a sister to curl_multi_wait() that waits moreDaniel Stenberg2019-08-061-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | Repeatedly we see problems where using curl_multi_wait() is difficult or just awkward because if it has no file descriptor to wait for internally, it returns immediately and leaves it to the caller to wait for a small amount of time in order to avoid occasional busy-looping. This is often missed or misunderstood, leading to underperforming applications. This change introduces curl_multi_poll() as a replacement drop-in function that accepts the exact same set of arguments. This function works identically to curl_multi_wait() - EXCEPT - for the case when there's nothing to wait for internally, as then this function will by itself wait for a "suitable" short time before it returns. This effectiely avoids all risks of busy-looping and should also make it less likely that apps "over-wait". This also changes the curl tool to use this funtion internally when doing parallel transfers and changes curl_easy_perform() to use it internally. Closes #4163
* spelling fixesViktor Szakats2018-02-231-2/+2
| | | | | | | | Detected using the `codespell` tool. Also contains one URL protocol upgrade. Closes https://github.com/curl/curl/pull/2334
* TODO fixed: Detect when called from within callbacksBjörn Stenberg2018-02-151-0/+2
| | | | Closes #2302
* headers: move the global_sslset() proto from multi.h to curl.hDaniel Stenberg2017-09-031-40/+0
| | | | | | As it was added to multi.h simply to not break test 1135, which now has been disabled due to the mime API addition anyway and su we can now move the sslset stuff to where the other curl_global_* prototypes are.
* curl/multi.h: remove duplicated closing c++ braceDaniel Stenberg2017-08-291-5/+1
| | | | | | | Regression since 1328f69d53f2f2e93 Fixes #1841 Reported-by: Andrei Karas
* vtls: introduce curl_global_sslset()Johannes Schindelin2017-08-281-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's add a compile time safe API to select an SSL backend. This function needs to be called *before* curl_global_init(), and can be called only once. Side note: we do not explicitly test that it is called before curl_global_init(), but we do verify that it is not called multiple times (even implicitly). If SSL is used before the function was called, it will use whatever the CURL_SSL_BACKEND environment variable says (or default to the first available SSL backend), and if a subsequent call to curl_global_sslset() disagrees with the previous choice, it will fail with CURLSSLSET_TOO_LATE. The function also accepts an "avail" parameter to point to a (read-only) NULL-terminated list of available backends. This comes in real handy if an application wants to let the user choose between whatever SSL backends the currently available libcurl has to offer: simply call curl_global_sslset(-1, NULL, &avail); which will return CURLSSLSET_UNKNOWN_BACKEND and populate the avail variable to point to the relevant information to present to the user. Just like with the HTTP/2 push functions, we have to add the function declaration of curl_global_sslset() function to the header file *multi.h* because VMS and OS/400 require a stable order of functions declared in include/curl/*.h (where the header files are sorted alphabetically). This looks a bit funny, but it cannot be helped. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
* spelling fixesklemens2017-03-261-1/+1
| | | | Closes #1356
* include: revert 9adf3c4 and make public types void * againDaniel Stenberg2016-07-311-0/+4
| | | | | | | | | | | | | | | | | Many applications assume the actual contents of the public types and use that do for example forward declarations (saving them from including our public header) which then breaks when we switch from void * to a struct *. I'm not convinced we were wrong, but since this practise seems widespread enough I'm willing to (partly) step down. Now libcurl uses the struct itself when it is built and it allows applications to use the struct type if CURL_STRICTER is defined at the time of the #include. Reported-by: Peter Frühberger Fixes #926
* headers: forward declare CURL, CURLM and CURLSH as structsDaniel Stenberg2016-06-221-2/+2
| | | | | | | Instead of typedef'ing to void, typedef to their corresponding actual struct names to allow compilers to type-check. Assisted-by: Reinhard Max
* URLs: change all http:// URLs to https://Daniel Stenberg2016-02-031-1/+1
|
* multi: Move http2 push function declarations to header endJay Satiro2015-06-301-24/+25
| | | | | | This change necessary for binary compatibility. Prior to this change test 1135 failed due to the order of functions.
* http2: curl_pushheader_byname now takes a const char *Daniel Stenberg2015-06-241-2/+1
|
* http2: fixed the header accessor functions for the push callbackDaniel Stenberg2015-06-241-11/+6
|
* http2: initial implementation of the push callbackDaniel Stenberg2015-06-241-1/+5
|
* http2: initial HTTP/2 server push types/docsDaniel Stenberg2015-06-241-0/+32
|
* CURLMOPT_PIPELINE: bit 1 is for multiplexingDaniel Stenberg2015-05-181-1/+6
|
* CURLM_ADDED_ALREADY: new error codeDaniel Stenberg2013-08-201-1/+3
| | | | | | Doing curl_multi_add_handle() on an easy handle that is already added to a multi handle now returns this error code. It previously returned CURLM_BAD_EASY_HANDLE for this condition.
* Multiple pipelines and limiting the number of connections.Linus Nielsen Feltzing2013-03-131-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introducing a number of options to the multi interface that allows for multiple pipelines to the same host, in order to optimize the balance between the penalty for opening new connections and the potential pipelining latency. Two new options for limiting the number of connections: CURLMOPT_MAX_HOST_CONNECTIONS - Limits the number of running connections to the same host. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished, so we can reuse the connection. CURLMOPT_MAX_TOTAL_CONNECTIONS - Limits the number of connections in total. When adding a handle that exceeds this limit, that handle will be put in a pending state until another handle is finished. The free connection will then be reused, if possible, or closed if the pending handle can't reuse it. Several new options for pipelining: CURLMOPT_MAX_PIPELINE_LENGTH - Limits the pipeling length. If a pipeline is "full" when a connection is to be reused, a new connection will be opened if the CURLMOPT_MAX_xxx_CONNECTIONS limits allow it. If not, the handle will be put in a pending state until a connection is ready (either free or a pipe got shorter). CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a transfer with a content length that is larger than this. CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE - A pipelined connection will not be reused if it is currently processing a chunk larger than this. CURLMOPT_PIPELINING_SITE_BL - A blacklist of hosts that don't allow pipelining. CURLMOPT_PIPELINING_SERVER_BL - A blacklist of server types that don't allow pipelining. See the curl_multi_setopt() man page for details.
* curl_multi_wait: Add parameter to return number of active socketsSara Golemon2012-09-161-1/+2
| | | | | Minor change to recently introduced function. BC breaking, but since curl_multi_wait() doesn't exist in any releases that should be fine.
* multi: add curl_multi_wait()Sara Golemon2012-09-011-1/+27
| | | | | | | | | | | | | | | /* * Name: curl_multi_wait() * * Desc: Poll on all fds within a CURLM set as well as any * additional fds passed to the function. * * Returns: CURLMcode type, general multi error code. */ CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, struct curl_waitfd extra_fds[], unsigned int extra_nfds, int timeout_ms);
* remove the CVSish $Id$ linesDaniel Stenberg2010-03-241-1/+0
|
* Adapting last changes to OS400:Patrick Monnerat2008-05-201-1/+1
| | | | | | | | _ Updated packages/OS400/curl.inc.in with new definitions. _ New connect/bind/sendto/recvfrom wrappers to support AF_UNIX sockets. _ Include files line length shortened below 100 chars. _ Const parameter in lib/qssl.[ch]. _ Typos in packages/OS400/initscript.sh.
* Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for settingDaniel Stenberg2007-05-301-0/+3
| | | | the maximum size of the connection cache maximum size of the multi handle.
* - Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is aDaniel Stenberg2007-04-161-1/+17
| | | | | | | | function that deprecates the curl_multi_socket() function. Using the new function the application tell libcurl what action that was found in the socket that it passes in. This gives a significant performance boost as it allows libcurl to avoid a call to poll()/select() for every call to curl_multi_socket*().
* Jeff Pohlmeyer has been working with the hiperfifo.c example source code,Daniel Stenberg2006-10-121-0/+20
| | | | | | | | | | | | and while doing so it became apparent that the current timeout system for the socket API really was a bit awkward since it become quite some work to be sure we have the correct timeout set. Jeff then provided the new CURLMOPT_TIMERFUNCTION that is yet another callback the app can set to get to know when the general timeout time changes and thus for an application like hiperfifo.c it makes everything a lot easier and nicer. There's a CURLMOPT_TIMERDATA option too of course in good old libcurl tradition.
* Major overhaul introducing http pipelining support and shared connectionDaniel Stenberg2006-09-071-0/+3
| | | | cache within the multi handle.
* David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA toDaniel Stenberg2006-08-291-40/+0
| | | | allow applications to set their own socket options.
* Use __minix to detect Minix, which works on both ACK and GCC.Dan Fandrich2006-08-111-1/+1
|
* Initial stab at making libcurl compile under Minix 3.Dan Fandrich2006-08-041-1/+1
|
* adding CURLM_CALL_MULTI_SOCKET that's just the same as CURLM_CALL_MULTI_PERFORMDaniel Stenberg2006-08-031-1/+7
|
* curl_multi_socket() and curl_multi_socket_all() got modified prototypes: theyDaniel Stenberg2006-07-301-2/+4
| | | | both now provide the number of running handles back to the calling function.
* [Hiper-related work] Added a function called curl_multi_assign() that willDaniel Stenberg2006-07-261-6/+23
| | | | | set a private pointer added to the internal libcurl hash table for the particular socket passed in to this function.
* Prevent definition of HAVE_WINxxx_H symbols and avoid inclusion of Windows ↵Yang Tse2006-07-051-2/+2
| | | | headers when compiled with Cygwin in POSIX emulation mode.
* curl_multi_socket() updatesDaniel Stenberg2006-04-101-16/+37
|
* include sys/select.h on NetBSD as wellDaniel Stenberg2006-01-281-1/+1
|
* Made the copyright year match the latest modification's year.Daniel Stenberg2006-01-091-1/+1
|
* Removed inaccurate comment for upcoming curl_multi_socket() and family.Daniel Stenberg2006-01-021-45/+2
| | | | Modified the callback proto used for it.
* Undo previous change. This header file belongs to the publicYang Tse2005-12-191-1/+5
| | | | | interface and the change could break the compilation of thrid party apps which link against this library.
* Cleanup windows header includes. Where aplicable, inclusion ofYang Tse2005-12-181-5/+1
| | | | windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
* added note about the inclusion of curl.h from within this fileDaniel Stenberg2005-11-281-0/+9
|
* Mohun Biswas' suggested change to prevent GNU indent to warn on the =-1 line.Daniel Stenberg2005-10-181-1/+1
|
* Initial curl_multi_socket() stuff, #ifdef'ed out for now but committed forDaniel Stenberg2005-04-181-14/+118
| | | | documentational purposes.
* Updated the copyright year since changes have been this year.Daniel Stenberg2005-03-311-1/+1
|
* skip sys/socket.h on windows CEDaniel Stenberg2005-01-181-0/+2
|
* Changes for removing libcurl.def file on Win32.Gisle Vanem2004-11-091-16/+16
| | | | Mark public functions with "CURL_EXTERN".
* Paul Nolan fix to make libcurl build nicely on Windows CEDaniel Stenberg2004-11-021-1/+2
|
* Günter Knauf and Casey O'Donnell worked out an extra #if condition for theDaniel Stenberg2004-09-301-0/+4
| | | | curl/multi.h header to work better in winsock-using apps.
* removed trailing whitespaceDaniel Stenberg2004-08-171-7/+7
|
* Added protos for the upcoming curl_*_strerror() functionsDaniel Stenberg2004-03-241-0/+11
|