Home | History | Annotate | Download | only in examples

Lines Matching defs:conn

122   ConnInfo *conn;
131 curl_easy_getinfo(easy, CURLINFO_PRIVATE, &conn);
133 MSG_OUT("DONE: %s => (%d) %s\n", eff_url, res, conn->error);
135 free(conn->url);
137 free(conn);
275 ConnInfo *conn = (ConnInfo*) data;
277 (void)conn;
285 ConnInfo *conn = (ConnInfo *)p;
286 MSG_OUT("Progress: %s (%g/%g)\n", conn->url, dlnow, dltotal);
293 ConnInfo *conn;
296 conn = g_malloc0(sizeof(ConnInfo));
297 conn->error[0]='\0';
298 conn->easy = curl_easy_init();
299 if(!conn->easy) {
303 conn->global = g;
304 conn->url = g_strdup(url);
305 curl_easy_setopt(conn->easy, CURLOPT_URL, conn->url);
306 curl_easy_setopt(conn->easy, CURLOPT_WRITEFUNCTION, write_cb);
307 curl_easy_setopt(conn->easy, CURLOPT_WRITEDATA, &conn);
308 curl_easy_setopt(conn->easy, CURLOPT_VERBOSE, (long)SHOW_VERBOSE);
309 curl_easy_setopt(conn->easy, CURLOPT_ERRORBUFFER, conn->error);
310 curl_easy_setopt(conn->easy, CURLOPT_PRIVATE, conn);
311 curl_easy_setopt(conn->easy, CURLOPT_NOPROGRESS, SHOW_PROGRESS?0L:1L);
312 curl_easy_setopt(conn->easy, CURLOPT_PROGRESSFUNCTION, prog_cb);
313 curl_easy_setopt(conn->easy, CURLOPT_PROGRESSDATA, conn);
314 curl_easy_setopt(conn->easy, CURLOPT_FOLLOWLOCATION, 1L);
315 curl_easy_setopt(conn->easy, CURLOPT_CONNECTTIMEOUT, 30L);
316 curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_LIMIT, 1L);
317 curl_easy_setopt(conn->easy, CURLOPT_LOW_SPEED_TIME, 30L);
319 MSG_OUT("Adding easy %p to multi %p (%s)\n", conn->easy, g->multi, url);
320 rc = curl_multi_add_handle(g->multi, conn->easy);