summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/multihandle.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/libcurl/src/multihandle.h')
-rw-r--r--libs/libcurl/src/multihandle.h47
1 files changed, 26 insertions, 21 deletions
diff --git a/libs/libcurl/src/multihandle.h b/libs/libcurl/src/multihandle.h
index a14f346819..9a5425aef9 100644
--- a/libs/libcurl/src/multihandle.h
+++ b/libs/libcurl/src/multihandle.h
@@ -27,10 +27,17 @@
#include "llist.h"
#include "hash.h"
#include "conncache.h"
+#include "cshutdn.h"
+#include "hostip.h"
+#include "multi_ev.h"
#include "psl.h"
#include "socketpair.h"
+#include "uint-bset.h"
+#include "uint-spbset.h"
+#include "uint-table.h"
struct connectdata;
+struct Curl_easy;
struct Curl_message {
struct Curl_llist_node list;
@@ -38,9 +45,9 @@ struct Curl_message {
struct CURLMsg extmsg;
};
-/* NOTE: if you add a state here, add the name to the statename[] array as
- well!
-*/
+/* NOTE: if you add a state here, add the name to the statenames[] array
+ * in curl_trc.c as well!
+ */
typedef enum {
MSTATE_INIT, /* 0 - start in this state */
MSTATE_PENDING, /* 1 - no connections, waiting for one */
@@ -86,17 +93,18 @@ struct Curl_multi {
this multi handle with an easy handle. Set this to CURL_MULTI_HANDLE. */
unsigned int magic;
- unsigned int num_easy; /* amount of entries in the linked list above. */
- unsigned int num_alive; /* amount of easy handles that are added but have
- not yet reached COMPLETE state */
+ unsigned int xfers_alive; /* amount of added transfers that have
+ not yet reached COMPLETE state */
+ struct uint_tbl xfers; /* transfers added to this multi */
+ /* Each transfer's mid may be present in at most one of these */
+ struct uint_bset process; /* transfer being processed */
+ struct uint_bset pending; /* transfers in waiting (conn limit etc.) */
+ struct uint_bset msgsent; /* transfers done with message for application */
struct Curl_llist msglist; /* a list of messages from completed transfers */
- /* Each added easy handle is added to ONE of these three lists */
- struct Curl_llist process; /* not in PENDING or MSGSENT */
- struct Curl_llist pending; /* in PENDING */
- struct Curl_llist msgsent; /* in MSGSENT */
- curl_off_t next_easy_mid; /* next multi-id for easy handle added */
+ struct Curl_easy *admin; /* internal easy handle for admin operations.
+ gets assigned `mid` 0 on multi init */
/* callback function and user data pointer for the *socket() API */
curl_socket_callback socket_cb;
@@ -106,8 +114,8 @@ struct Curl_multi {
curl_push_callback push_cb;
void *push_userp;
- /* Hostname cache */
- struct Curl_hash hostcache;
+ struct Curl_dnscache dnscache; /* DNS cache */
+ struct Curl_ssl_scache *ssl_scache; /* TLS session pool */
#ifdef USE_LIBPSL
/* PSL cache. */
@@ -128,10 +136,9 @@ struct Curl_multi {
char *xfer_sockbuf; /* the actual buffer */
size_t xfer_sockbuf_len; /* the allocated length */
- /* 'sockhash' is the lookup hash for socket descriptor => easy handles (note
- the pluralis form, there can be more than one easy handle waiting on the
- same actual socket) */
- struct Curl_hash sockhash;
+ /* multi event related things */
+ struct curl_multi_ev ev;
+
/* `proto_hash` is a general key-value store for protocol implementations
* with the lifetime of the multi handle. The number of elements kept here
* should be in the order of supported protocols (and sub-protocols like
@@ -140,16 +147,14 @@ struct Curl_multi {
* the multi handle is cleaned up (see Curl_hash_add2()).*/
struct Curl_hash proto_hash;
- /* Shared connection cache (bundles)*/
- struct cpool cpool;
+ struct cshutdn cshutdn; /* connection shutdown handling */
+ struct cpool cpool; /* connection pool (bundles) */
long max_host_connections; /* if >0, a fixed limit of the maximum number
of connections per host */
long max_total_connections; /* if >0, a fixed limit of the maximum number
of connections in total */
- long max_shutdown_connections; /* if >0, a fixed limit of the maximum number
- of connections in shutdown handling */
/* timer callback and user data pointer for the *socket() API */
curl_multi_timer_callback timer_cb;