module Multi:sig
..end
Failure
on critical errorstype
mt
exception Error of string
val create : unit -> mt
val add : mt -> Curl.t -> unit
val remove : mt -> Curl.t -> unit
val perform : mt -> int
val wait : mt -> bool
perform
should be calledval remove_finished : mt -> (Curl.t * Curl.curlCode) option
val cleanup : mt -> unit
Curl.t
handles can be reused)type
poll =
| |
POLL_NONE |
(* |
none
| *) |
| |
POLL_IN |
(* |
available for reading
| *) |
| |
POLL_OUT |
(* |
available for writing
| *) |
| |
POLL_INOUT |
(* |
both
| *) |
| |
POLL_REMOVE |
(* |
socket not needed anymore
| *) |
type
fd_status =
| |
EV_AUTO |
(* |
determine socket status automatically (with extra system call)
| *) |
| |
EV_IN |
(* |
socket has incoming data
| *) |
| |
EV_OUT |
(* |
socket is available for writing
| *) |
| |
EV_INOUT |
(* |
both
| *) |
val set_socket_function : mt -> (Unix.file_descr -> poll -> unit) -> unit
val set_timer_function : mt -> (int -> unit) -> unit
NB Curl.Multi.action_timeout
should be called when timeout occurs
val action_all : mt -> int
Curl.Multi.action
should be used instead)Error
on errorsval action_timeout : mt -> unit
Error
on errorsval 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.Error
on errorsval timeout : mt -> int
timeout mt
polls multi handle for timeout (not recommended, use Curl.Multi.set_timer_function
instead).Error
on errors