package ocurl
Install
Dune Dependency
Authors
Maintainers
Sources
md5=8a4149c6cfa79dabdfde24f308ad1f0c
sha256=e0359718c874dacd55c0b596e5dee1d23b4c394b9b5a604f1a6d618217d67763
sha512=5d670e32cdd492fa0e495b9b6b5171a9811542a520a777ed87d245ffc28cc5211d94a097750e632ee939ccc6eb91afd4b186b84d72168500e48790800b637400
doc/curl/Curl/Multi/index.html
Module Curl.Multi
Curl 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 int
exception CError of string * cerror * string
exception raised on libcurl errors : origin * code * message
val create : unit -> mt
create new multi stack
val perform : mt -> int
perform pending data transfers (if any) on all handles currently in multi stack
val wait : ?timeout_ms:int -> mt -> bool
wait till there are some active data transfers on multi stack
val poll : ?timeout_ms:int -> mt -> bool
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 -> unit
destroy multi handle (all transfers are stopped, but individual Curl.t
handles can be reused)
val set_socket_function : mt -> (Unix.file_descr -> poll -> unit) -> unit
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) -> unit
set 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 action_all : mt -> int
perform pending data transfers (if any) on all handles currently in multi stack (not recommended, action
should be used instead)
val action_timeout : mt -> unit
inform libcurl that timeout occured
val action : mt -> Unix.file_descr -> fd_status -> int
action mt fd status
informs libcurl about event on the specified socket. status
specifies socket status. Perform pending data transfers.
val timeout : mt -> int
timeout mt
polls multi handle for timeout (not recommended, use set_timer_function
instead).
val setopt : mt -> curlMultiOption -> unit