Lines Matching defs:multi

398 static int events_timer(struct Curl_multi *multi,    /* multi handle */
403 (void)multi;
532 * Do the multi handle setups that only event-based transfers need.
534 static void events_setup(struct Curl_multi *multi, struct events *ev)
537 curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, events_timer);
538 curl_multi_setopt(multi, CURLMOPT_TIMERDATA, ev);
541 curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, events_socket);
542 curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, ev);
551 static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
594 mcode = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0,
605 infof(multi->easyp,
608 mcode = curl_multi_socket_action(multi, fds[i].fd, act,
632 msg = curl_multi_info_read(multi, &pollrc);
647 static CURLcode easy_events(struct Curl_multi *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(struct Curl_multi *multi)
672 mcode = curl_multi_poll(multi, NULL, 0, 1000, NULL);
675 mcode = curl_multi_perform(multi, &still_running);
680 CURLMsg *msg = curl_multi_info_read(multi, &rc);
688 /* Make sure to return some kind of error if there was a multi problem */
691 /* The other multi errors should never happen, so return
704 * CONCEPT: This function creates a multi handle, adds the easy handle to it,
706 * easy handle, destroys the multi handle and returns the easy handle's return
709 * REALITY: it can't just create and destroy the multi handle that easily. It
711 * function, the same multi handle must be reused so that the same pools and
719 struct Curl_multi *multi;
731 if(data->multi) {
732 failf(data, "easy handle already used in multi handle");
737 multi = data->multi_easy;
739 /* this multi handle will only ever have a single easy handled attached
741 multi = Curl_multi_handle(1, 3, 7);
742 if(!multi)
744 data->multi_easy = multi;
747 if(multi->in_callback)
750 /* Copy the MAXCONNECTS option to the multi handle */
751 curl_multi_setopt(multi, CURLMOPT_MAXCONNECTS, (long)data->set.maxconnects);
753 mcode = curl_multi_add_handle(multi, data);
755 curl_multi_cleanup(multi);
765 result = events ? easy_events(multi) : easy_transfer(multi);
769 (void)curl_multi_remove_handle(multi, data);
773 /* The multi handle is kept alive, owned by the easy handle */
1149 if(data->multi) {
1150 if(Curl_update_timer(data->multi))