Commit Graph

60 Commits

Author SHA1 Message Date
klemens f7df67cff0 spelling fixes
Closes #1356
2017-03-26 23:56:23 +02:00
Daniel Stenberg d6604524ad include: revert 9adf3c4 and make public types void * again
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
2016-07-31 22:59:22 +02:00
Daniel Stenberg 9adf3c473a headers: forward declare CURL, CURLM and CURLSH as structs
Instead of typedef'ing to void, typedef to their corresponding actual
struct names to allow compilers to type-check.

Assisted-by: Reinhard Max
2016-06-22 10:28:36 +02:00
Daniel Stenberg 4af40b3646 URLs: change all http:// URLs to https:// 2016-02-03 00:19:02 +01:00
Jay Satiro 66a5f76583 multi: Move http2 push function declarations to header end
This change necessary for binary compatibility.

Prior to this change test 1135 failed due to the order of functions.
2015-06-30 17:19:21 -04:00
Daniel Stenberg a384f28ca6 http2: curl_pushheader_byname now takes a const char * 2015-06-24 23:44:42 +02:00
Daniel Stenberg f65ab8864e http2: fixed the header accessor functions for the push callback 2015-06-24 23:44:42 +02:00
Daniel Stenberg ea7134ac87 http2: initial implementation of the push callback 2015-06-24 23:44:42 +02:00
Daniel Stenberg 70191958b5 http2: initial HTTP/2 server push types/docs 2015-06-24 23:44:42 +02:00
Daniel Stenberg 02ec1ced9b CURLMOPT_PIPELINE: bit 1 is for multiplexing 2015-05-18 08:57:18 +02:00
Daniel Stenberg 19122c0768 CURLM_ADDED_ALREADY: new error code
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.
2013-08-20 23:13:19 +02:00
Linus Nielsen Feltzing 0f147887b0 Multiple pipelines and limiting the number of connections.
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.
2013-03-13 23:55:24 +01:00
Sara Golemon b78944146a curl_multi_wait: Add parameter to return number of active sockets
Minor change to recently introduced function.  BC breaking, but since
curl_multi_wait() doesn't exist in any releases that should be fine.
2012-09-16 19:58:02 +02:00
Sara Golemon de24d7bd4c multi: add curl_multi_wait()
/*
 * 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);
2012-09-01 23:10:53 +02:00
Daniel Stenberg 2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Patrick Monnerat 24bf52bc69 Adapting last changes to OS400:
_ 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.
2008-05-20 10:21:50 +00:00
Daniel Stenberg a49e78d9b7 Added CURLMOPT_MAXCONNECTS which is a curl_multi_setopt() option for setting
the maximum size of the connection cache maximum size of the multi handle.
2007-05-30 20:04:44 +00:00
Daniel Stenberg 76627b322e - Robert Iakobashvil added curl_multi_socket_action() to libcurl, which is a
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*().
2007-04-16 16:34:08 +00:00
Daniel Stenberg b61c06384a Jeff Pohlmeyer has been working with the hiperfifo.c example source code,
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.
2006-10-12 08:36:47 +00:00
Daniel Stenberg b7eeb6e67f Major overhaul introducing http pipelining support and shared connection
cache within the multi handle.
2006-09-07 21:49:20 +00:00
Daniel Stenberg 5acadc9cd7 David McCreedy added CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA to
allow applications to set their own socket options.
2006-08-29 14:39:33 +00:00
Dan Fandrich eb26a581f9 Use __minix to detect Minix, which works on both ACK and GCC. 2006-08-11 18:11:42 +00:00
Dan Fandrich c012e2b408 Initial stab at making libcurl compile under Minix 3. 2006-08-04 18:53:47 +00:00
Daniel Stenberg 51f258d103 adding CURLM_CALL_MULTI_SOCKET that's just the same as CURLM_CALL_MULTI_PERFORM 2006-08-03 21:31:23 +00:00
Daniel Stenberg 01b2cf82ec curl_multi_socket() and curl_multi_socket_all() got modified prototypes: they
both now provide the number of running handles back to the calling function.
2006-07-30 22:44:07 +00:00
Daniel Stenberg 6f6b93da02 [Hiper-related work] Added a function called curl_multi_assign() that will
set a private pointer added to the internal libcurl hash table for the
particular socket passed in to this function.
2006-07-26 22:19:42 +00:00
Yang Tse bc2f0c7dcb Prevent definition of HAVE_WINxxx_H symbols and avoid inclusion of Windows headers when compiled with Cygwin in POSIX emulation mode. 2006-07-05 23:10:37 +00:00
Daniel Stenberg 778b6a86c0 curl_multi_socket() updates 2006-04-10 13:12:52 +00:00
Daniel Stenberg c44d2498e3 include sys/select.h on NetBSD as well 2006-01-28 13:13:58 +00:00
Daniel Stenberg bda1e9aeab Made the copyright year match the latest modification's year. 2006-01-09 13:17:14 +00:00
Daniel Stenberg b6e9229cf0 Removed inaccurate comment for upcoming curl_multi_socket() and family.
Modified the callback proto used for it.
2006-01-02 23:37:48 +00:00
Yang Tse e6b98d3152 Undo previous change. This header file belongs to the public
interface and the change could break the compilation of thrid
party apps which link against this library.
2005-12-19 00:15:04 +00:00
Yang Tse d6c5d24af3 Cleanup windows header includes. Where aplicable, inclusion of
windows.h winsock.h winsock2.h ws2tcpip.h is done in setup.h
2005-12-18 15:36:14 +00:00
Daniel Stenberg fdf9900114 added note about the inclusion of curl.h from within this file 2005-11-28 07:43:53 +00:00
Daniel Stenberg fdef584681 Mohun Biswas' suggested change to prevent GNU indent to warn on the =-1 line. 2005-10-18 07:26:43 +00:00
Daniel Stenberg 9a9c07f571 Initial curl_multi_socket() stuff, #ifdef'ed out for now but committed for
documentational purposes.
2005-04-18 11:40:50 +00:00
Daniel Stenberg ab4086bc24 Updated the copyright year since changes have been this year. 2005-03-31 07:02:02 +00:00
Daniel Stenberg 0406b1facf skip sys/socket.h on windows CE 2005-01-18 15:13:23 +00:00
Gisle Vanem 3ccbed1022 Changes for removing libcurl.def file on Win32.
Mark public functions with "CURL_EXTERN".
2004-11-09 14:02:58 +00:00
Daniel Stenberg 24d47a6e07 Paul Nolan fix to make libcurl build nicely on Windows CE 2004-11-02 10:12:22 +00:00
Daniel Stenberg d4db35c125 Gnter Knauf and Casey O'Donnell worked out an extra #if condition for the
curl/multi.h header to work better in winsock-using apps.
2004-09-30 19:50:36 +00:00
Daniel Stenberg d0dcb3b554 removed trailing whitespace 2004-08-17 19:46:34 +00:00
Daniel Stenberg eab8cdc640 Added protos for the upcoming curl_*_strerror() functions 2004-03-24 22:53:42 +00:00
Daniel Stenberg 5b55f9ecb3 Gnter Knauf's NetWare changes. 2004-03-17 12:46:42 +00:00
Daniel Stenberg 4515d06465 David Byron's fixes to make the latest curl build fine under MSVC 6. 2004-02-26 16:23:28 +00:00
Daniel Stenberg 053f6c85ef updated year in the copyright string 2004-01-07 09:19:33 +00:00
Daniel Stenberg c32390d84c Reversed the logic to only include the <sys/select.h> header on systems
known to really NEED it as another system that doesn't have it came up:
very old Linux libc5-based systems (as addition to all HPUX versions).

The only known system at this point is AIX.
2003-06-05 14:04:44 +00:00
Daniel Stenberg 18234cbdac sys/select.h is not present on HPUX, avoid including it 2003-05-27 12:34:48 +00:00
Daniel Stenberg e97fd44151 language 2003-05-26 12:32:22 +00:00
Daniel Stenberg 35a84ad576 Chris Lewis mentioned that he doesn't get WIN32 defined, only _WIN32 so we
make an adjustment to catch this.
2003-05-26 07:57:53 +00:00