Curl.MultiCurl multi stack. Functions may raise Failure on critical errors
type curlMultiOption = | CURLMOPT_PIPELINING of curlPipelining list| CURLMOPT_MAXCONNECTS of int| CURLMOPT_MAX_PIPELINE_LENGTH of int| CURLMOPT_MAX_HOST_CONNECTIONS of int| CURLMOPT_MAX_TOTAL_CONNECTIONS of intval int_of_cerror : cerror -> intexception CError of string * cerror * stringexception raised on libcurl errors : origin * code * message
val create : unit -> mtcreate new multi stack
val perform : mt -> intperform pending data transfers (if any) on all handles currently in multi stack
val waitfd : Unix.file_descr -> waitfd_event list -> waitfdval waitfd_fd : waitfd -> Unix.file_descrval waitfd_isset : waitfd -> waitfd_event -> boolwait till there are some active data transfers on multi stack
poll till there are some active data transfers on multi stack. Contrary to wait, this function does not return immediately when there are no pending transfer but waits for timeout_ms The module falls back to wait if this function is unavailable.
remove finished handle from the multi stack if any. The returned handle may be reused
val cleanup : mt -> unitdestroy multi handle (all transfers are stopped, but individual Curl.t handles can be reused)
set the function to receive notifications on what socket events are currently interesting for libcurl on the specified socket handle
val set_timer_function : mt -> (int -> unit) -> unitset the function to receive notification when libcurl internal timeout changes, timeout value is in milliseconds
NB action_timeout should be called when timeout occurs
val set_closesocket_function : mt -> (Unix.file_descr -> unit) -> unitset a function to be called to close a socket.
The underlying callback is a property of the easy handle, but cannot be stored there in these bindings because libcurl's use of this callback may occur outside the lifetime of the easy handle. This means that all easy handles added to a multi handle must use the same closesocket function.
val action_all : mt -> intperform pending data transfers (if any) on all handles currently in multi stack (not recommended, action should be used instead)
val action_timeout : mt -> unitinform libcurl that timeout occured
action mt fd status informs libcurl about event on the specified socket. status specifies socket status. Perform pending data transfers.
val timeout : mt -> inttimeout mt polls multi handle for timeout (not recommended, use set_timer_function instead).
val setopt : mt -> curlMultiOption -> unit