• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/curl/curl-7.36.0/lib/

Lines Matching defs:multi

423 static int events_timer(CURLM *multi,    /* multi handle */
428 (void)multi;
546 * Do the multi handle setups that only event-based transfers need.
548 static void events_setup(CURLM *multi, struct events *ev)
551 curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, events_timer);
552 curl_multi_setopt(multi, CURLMOPT_TIMERDATA, ev);
555 curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, events_socket);
556 curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, ev);
565 static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
606 mcode = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0,
615 infof(multi->easyp, "call curl_multi_socket_action( socket %d )\n",
617 mcode = curl_multi_socket_action(multi, fds[i].fd, act,
634 msg = curl_multi_info_read(multi, &pollrc);
649 static CURLcode easy_events(CURLM *multi)
653 /* if running event-based, do some further multi inits */
654 events_setup(multi, &evs);
656 return wait_or_timeout(multi, &evs);
663 static CURLcode easy_transfer(CURLM *multi)
677 mcode = curl_multi_wait(multi, NULL, 0, 1000, &ret);
705 mcode = curl_multi_perform(multi, &still_running);
711 CURLMsg *msg = curl_multi_info_read(multi, &rc);
719 /* Make sure to return some kind of error if there was a multi problem */
722 /* The other multi errors should never happen, so return
735 * CONCEPT: This function creates a multi handle, adds the easy handle to it,
737 * easy handle, destroys the multi handle and returns the easy handle's return
740 * REALITY: it can't just create and destroy the multi handle that easily. It
742 * function, the same multi handle must be re-used so that the same pools and
750 CURLM *multi;
758 if(data->multi) {
759 failf(data, "easy handled already used in multi handle");
764 multi = data->multi_easy;
766 /* this multi handle will only ever have a single easy handled attached
768 multi = Curl_multi_handle(1, 3);
769 if(!multi)
771 data->multi_easy = multi;
774 /* Copy the MAXCONNECTS option to the multi handle */
775 curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, data->set.maxconnects);
777 mcode = curl_multi_add_handle(multi, data);
779 curl_multi_cleanup(multi);
790 data->multi = multi;
793 code = events ? easy_events(multi) : easy_transfer(multi);
797 (void)curl_multi_remove_handle(multi, data);
801 /* The multi handle is kept alive, owned by the easy handle */