• Home
  • Raw
  • Download

Lines Matching refs:connc

114 int Curl_conncache_init(struct conncache *connc, int size)  in Curl_conncache_init()  argument
119 connc->closure_handle = curl_easy_init(); in Curl_conncache_init()
120 if(!connc->closure_handle) in Curl_conncache_init()
123 rc = Curl_hash_init(&connc->hash, size, Curl_hash_str, in Curl_conncache_init()
126 Curl_close(&connc->closure_handle); in Curl_conncache_init()
128 connc->closure_handle->state.conn_cache = connc; in Curl_conncache_init()
133 void Curl_conncache_destroy(struct conncache *connc) in Curl_conncache_destroy() argument
135 if(connc) in Curl_conncache_destroy()
136 Curl_hash_destroy(&connc->hash); in Curl_conncache_destroy()
191 struct conncache *connc, in Curl_conncache_find_bundle() argument
196 if(connc) { in Curl_conncache_find_bundle()
199 bundle = Curl_hash_pick(&connc->hash, key, strlen(key)); in Curl_conncache_find_bundle()
205 static bool conncache_add_bundle(struct conncache *connc, in conncache_add_bundle() argument
209 void *p = Curl_hash_add(&connc->hash, key, strlen(key), bundle); in conncache_add_bundle()
214 static void conncache_remove_bundle(struct conncache *connc, in conncache_remove_bundle() argument
220 if(!connc) in conncache_remove_bundle()
223 Curl_hash_start_iterate(&connc->hash, &iter); in conncache_remove_bundle()
230 Curl_hash_delete(&connc->hash, he->key, he->key_len); in conncache_remove_bundle()
243 struct conncache *connc = data->state.conn_cache; in Curl_conncache_add_conn() local
269 conn->connection_id = connc->next_connection_id++; in Curl_conncache_add_conn()
270 connc->num_conn++; in Curl_conncache_add_conn()
274 conn->connection_id, connc->num_conn)); in Curl_conncache_add_conn()
293 struct conncache *connc = data->state.conn_cache; in Curl_conncache_remove_conn() local
303 conncache_remove_bundle(connc, bundle); in Curl_conncache_remove_conn()
305 if(connc) { in Curl_conncache_remove_conn()
306 connc->num_conn--; in Curl_conncache_remove_conn()
308 connc->num_conn)); in Curl_conncache_remove_conn()
329 struct conncache *connc, in Curl_conncache_foreach() argument
338 if(!connc) in Curl_conncache_foreach()
342 Curl_hash_start_iterate(&connc->hash, &iter); in Curl_conncache_foreach()
375 conncache_find_first_connection(struct conncache *connc) in conncache_find_first_connection() argument
381 Curl_hash_start_iterate(&connc->hash, &iter); in conncache_find_first_connection()
489 struct conncache *connc = data->state.conn_cache; in Curl_conncache_extract_oldest() local
503 Curl_hash_start_iterate(&connc->hash, &iter); in Curl_conncache_extract_oldest()
534 connc->num_conn--; in Curl_conncache_extract_oldest()
536 connc->num_conn)); in Curl_conncache_extract_oldest()
543 void Curl_conncache_close_all_connections(struct conncache *connc) in Curl_conncache_close_all_connections() argument
547 if(!connc->closure_handle) in Curl_conncache_close_all_connections()
549 connc->closure_handle->state.buffer = buffer; in Curl_conncache_close_all_connections()
550 connc->closure_handle->set.buffer_size = READBUFFER_MIN; in Curl_conncache_close_all_connections()
552 conn = conncache_find_first_connection(connc); in Curl_conncache_close_all_connections()
555 sigpipe_ignore(connc->closure_handle, &pipe_st); in Curl_conncache_close_all_connections()
558 Curl_conncache_remove_conn(connc->closure_handle, conn, TRUE); in Curl_conncache_close_all_connections()
559 (void)Curl_disconnect(connc->closure_handle, conn, FALSE); in Curl_conncache_close_all_connections()
562 conn = conncache_find_first_connection(connc); in Curl_conncache_close_all_connections()
565 connc->closure_handle->state.buffer = NULL; in Curl_conncache_close_all_connections()
566 if(connc->closure_handle) { in Curl_conncache_close_all_connections()
568 sigpipe_ignore(connc->closure_handle, &pipe_st); in Curl_conncache_close_all_connections()
570 Curl_hostcache_clean(connc->closure_handle, in Curl_conncache_close_all_connections()
571 connc->closure_handle->dns.hostcache); in Curl_conncache_close_all_connections()
572 Curl_close(&connc->closure_handle); in Curl_conncache_close_all_connections()
579 void Curl_conncache_print(struct conncache *connc)
585 if(!connc)
590 Curl_hash_start_iterate(connc->hash, &iter);