Lines Matching defs:connc
50 struct conncache *connc;
52 connc = calloc(1, sizeof(struct conncache));
53 if(!connc)
56 connc->hash = Curl_hash_alloc(size, Curl_hash_str,
59 if(!connc->hash) {
60 free(connc);
64 return connc;
67 void Curl_conncache_destroy(struct conncache *connc)
69 if(connc) {
70 Curl_hash_destroy(connc->hash);
71 connc->hash = NULL;
72 free(connc);
76 struct connectbundle *Curl_conncache_find_bundle(struct conncache *connc,
81 if(connc)
82 bundle = Curl_hash_pick(connc->hash, hostname, strlen(hostname)+1);
87 static bool conncache_add_bundle(struct conncache *connc,
93 p = Curl_hash_add(connc->hash, hostname, strlen(hostname)+1, bundle);
98 static void conncache_remove_bundle(struct conncache *connc,
104 if(!connc)
107 Curl_hash_start_iterate(connc->hash, &iter);
114 Curl_hash_delete(connc->hash, he->key, he->key_len);
122 CURLcode Curl_conncache_add_conn(struct conncache *connc,
152 connc->num_connections++;
157 void Curl_conncache_remove_conn(struct conncache *connc,
167 conncache_remove_bundle(connc, bundle);
170 if(connc) {
171 connc->num_connections--;
174 connc->num_connections));
185 void Curl_conncache_foreach(struct conncache *connc,
193 if(!connc)
196 Curl_hash_start_iterate(connc->hash, &iter);
223 Curl_conncache_find_first_connection(struct conncache *connc)
230 Curl_hash_start_iterate(connc->hash, &iter);
250 void Curl_conncache_print(struct conncache *connc)
256 if(!connc)
261 Curl_hash_start_iterate(connc->hash, &iter);