curl_multi_perform.3 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. .\" $Id: curl_multi_perform.3,v 1.4 2004/03/15 11:37:38 bagder Exp $
  2. .\"
  3. .TH curl_multi_perform 3 "1 March 2002" "libcurl 7.9.5" "libcurl Manual"
  4. .SH NAME
  5. curl_multi_perform - reads/writes available data from each easy handle
  6. .SH SYNOPSIS
  7. #include <curl/curl.h>
  8. CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles);
  9. .ad
  10. .SH DESCRIPTION
  11. When the app thinks there's data available for the multi_handle, it should
  12. call this function to read/write whatever there is to read or write right
  13. now. curl_multi_perform() returns as soon as the reads/writes are done. This
  14. function does not require that there actually is any data available for
  15. reading or that data can be written, it can be called just in case. It will
  16. write the number of handles that still transfer data in the second argument's
  17. integer-pointer.
  18. .SH "RETURN VALUE"
  19. CURLMcode type, general libcurl multi interface error code.
  20. If you receive \fICURLM_CALL_MULTI_PERFORM\fP, this basicly means that you
  21. should call \fIcurl_multi_perform\fP again, before you select() on more
  22. actions. You don't have to do it immediately, but the return code means that
  23. libcurl may have more data available to return or that there may be more data
  24. to send off before it is "satisfied".
  25. NOTE that this only returns errors etc regarding the whole multi stack. There
  26. might still have occurred problems on invidual transfers even when this
  27. function returns OK.
  28. .SH "TYPICAL USAGE"
  29. Most application will use \fIcurl_multi_fdset(3)\fP to get the multi_handle's
  30. file descriptors, then it'll wait for action on them using select() and as
  31. soon as one or more of them are ready, \fIcurl_multi_perform(3)\fP gets
  32. called.
  33. .SH "SEE ALSO"
  34. .BR curl_multi_cleanup "(3)," curl_multi_init "(3)," curl_multi_fdset "(3)"