curl_multi_add_handle - add an easy handle to a multi session
#include <curl/curl.h>
CURLMcode curl_multi_add_handle(CURLM *multi_handle, CURL *easy_handle);
Adds a standard easy handle to the multi stack. This function call will make this multi_handle control the specified easy_handle. Furthermore, libcurl now initiates the connection associated with the specified easy_handle.
When an easy handle has been added to a multi stack, you can not and you must not use curl_easy_perform(3) on that handle!
If the easy handle is not set to use aing the appropriate options to curl_multi_setopt(3), you can change libcurl's behaviour when using that multi handle. All options are set with the option followed by the parameter param. That parameter can be a long, a function pointer, an object pointer or a curl_off_t type, depending on what the specific option expects. Read this manual carefully as bad input values may cause libcurl to behave badly! You can only set one option in each function call.
Pass a pointer to a function matching the curl_socket_callback prototype. The curl_multi_socket(3) functions inform the application about updates in the socket (file descriptor) status by doing none, one or multiple calls to the curl_socket_callback given in the param argument. They update the status with changes since the previous time a