conncache.h
Go to the documentation of this file.
1 #ifndef HEADER_CURL_CONNCACHE_H
2 #define HEADER_CURL_CONNCACHE_H
3 /***************************************************************************
4  * _ _ ____ _
5  * Project ___| | | | _ \| |
6  * / __| | | | |_) | |
7  * | (__| |_| | _ <| |___
8  * \___|\___/|_| \_\_____|
9  *
10  * Copyright (C) 2015 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11  * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, <linus@haxx.se>
12  *
13  * This software is licensed as described in the file COPYING, which
14  * you should have received as part of this distribution. The terms
15  * are also available at https://curl.haxx.se/docs/copyright.html.
16  *
17  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
18  * copies of the Software, and permit persons to whom the Software is
19  * furnished to do so, under the terms of the COPYING file.
20  *
21  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22  * KIND, either express or implied.
23  *
24  ***************************************************************************/
25 
26 struct conncache {
27  struct curl_hash hash;
31 };
32 
33 #define BUNDLE_NO_MULTIUSE -1
34 #define BUNDLE_UNKNOWN 0 /* initial value */
35 #define BUNDLE_PIPELINING 1
36 #define BUNDLE_MULTIPLEX 2
37 
38 struct connectbundle {
39  int multiuse; /* supports multi-use */
40  size_t num_connections; /* Number of connections in the bundle */
41  struct curl_llist conn_list; /* The connectdata members of the bundle */
42 };
43 
44 int Curl_conncache_init(struct conncache *, int size);
45 
46 void Curl_conncache_destroy(struct conncache *connc);
47 
48 /* return the correct bundle, to a host or a proxy */
50  struct conncache *connc);
51 
53  struct connectdata *conn);
54 
55 void Curl_conncache_remove_conn(struct conncache *connc,
56  struct connectdata *conn);
57 
58 void Curl_conncache_foreach(struct conncache *connc,
59  void *param,
60  int (*func)(struct connectdata *conn,
61  void *param));
62 
63 struct connectdata *
65 
66 void Curl_conncache_print(struct conncache *connc);
67 
68 #endif /* HEADER_CURL_CONNCACHE_H */
Definition: hash.h:46
void Curl_conncache_destroy(struct conncache *connc)
Definition: conncache.c:116
struct curl_hash hash
Definition: conncache.h:27
CURLcode
Definition: curl.h:454
long next_connection_id
Definition: conncache.h:29
size_t num_connections
Definition: conncache.h:40
void Curl_conncache_print(struct conncache *connc)
struct curltime last_cleanup
Definition: conncache.h:30
struct connectbundle * Curl_conncache_find_bundle(struct connectdata *conn, struct conncache *connc)
Definition: conncache.c:145
size_t num_connections
Definition: conncache.h:28
struct connectdata * Curl_conncache_find_first_connection(struct conncache *connc)
Definition: conncache.c:300
int Curl_conncache_init(struct conncache *, int size)
Definition: conncache.c:110
void Curl_conncache_remove_conn(struct conncache *connc, struct connectdata *conn)
Definition: conncache.c:235
size_t size
Definition: unit1302.c:52
void Curl_conncache_foreach(struct conncache *connc, void *param, int(*func)(struct connectdata *conn, void *param))
Definition: conncache.c:264
CURLcode Curl_conncache_add_conn(struct conncache *connc, struct connectdata *conn)
Definition: conncache.c:191


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:08