Module Luv.Request

Requests.

See Requests in the user guide and uv_req_tBase request in libuv.

Requests are objects libuv uses to track asynchronous operations, and sometimes to communicate their results. For the most part Luv handles requests automatically.

Some request kinds support cancelation, and Luv provides a common function Luv.Request.cancel for them.

Apart from that, this module would be only an internal convenience for the implementation of Luv.

The full list of exposed concrete request types:

type 'kind t = 'kind Luv__.C.Types.Request.t Ctypes.ptr

Binds uv_req_t.

val cancel : [< `File | `Addr_info | `Name_info | `Thread_pool ] t -> (unit, Error.t) Result.result

Tries to cancel a pending request.

Binds uv_cancel.