Lines Matching defs:connc
104 int Curl_conncache_init(struct conncache *connc, int size)
107 connc->closure_handle = curl_easy_init();
108 if(!connc->closure_handle)
110 connc->closure_handle->state.internal = true;
112 Curl_hash_init(&connc->hash, size, Curl_hash_str,
114 connc->closure_handle->state.conn_cache = connc;
119 void Curl_conncache_destroy(struct conncache *connc)
121 if(connc)
122 Curl_hash_destroy(&connc->hash);
171 struct conncache *connc)
175 if(connc) {
178 bundle = Curl_hash_pick(&connc->hash, key, strlen(key));
184 static void *conncache_add_bundle(struct conncache *connc,
188 return Curl_hash_add(&connc->hash, key, strlen(key), bundle);
191 static void conncache_remove_bundle(struct conncache *connc,
197 if(!connc)
200 Curl_hash_start_iterate(&connc->hash, &iter);
207 Curl_hash_delete(&connc->hash, he->key, he->key_len);
220 struct conncache *connc = data->state.conn_cache;
243 conn->connection_id = connc->next_connection_id++;
244 connc->num_conn++;
248 conn->connection_id, connc->num_conn));
267 struct conncache *connc = data->state.conn_cache;
277 conncache_remove_bundle(connc, bundle);
279 if(connc) {
280 connc->num_conn--;
282 connc->num_conn));
303 struct conncache *connc,
312 if(!connc)
316 Curl_hash_start_iterate(&connc->hash, &iter);
349 conncache_find_first_connection(struct conncache *connc)
355 Curl_hash_start_iterate(&connc->hash, &iter);
397 struct conncache *connc = data->state.conn_cache;
398 connc->closure_handle->state.buffer = data->state.buffer;
399 connc->closure_handle->set.buffer_size = data->set.buffer_size;
400 Curl_disconnect(connc->closure_handle, conn_candidate,
468 struct conncache *connc = data->state.conn_cache;
482 Curl_hash_start_iterate(&connc->hash, &iter);
513 connc->num_conn--;
515 connc->num_conn));
522 void Curl_conncache_close_all_connections(struct conncache *connc)
527 if(!connc->closure_handle)
529 connc->closure_handle->state.buffer = buffer;
530 connc->closure_handle->set.buffer_size = READBUFFER_MIN;
532 conn = conncache_find_first_connection(connc);
534 sigpipe_ignore(connc->closure_handle, &pipe_st);
537 Curl_conncache_remove_conn(connc->closure_handle, conn, TRUE);
538 Curl_disconnect(connc->closure_handle, conn, FALSE);
541 conn = conncache_find_first_connection(connc);
544 connc->closure_handle->state.buffer = NULL;
545 sigpipe_ignore(connc->closure_handle, &pipe_st);
547 Curl_hostcache_clean(connc->closure_handle,
548 connc->closure_handle->dns.hostcache);
549 Curl_close(&connc->closure_handle);
555 void Curl_conncache_print(struct conncache *connc)
561 if(!connc)
566 Curl_hash_start_iterate(connc->hash, &iter);