uv_req_t is the base type for all libuv request types.
Structures are aligned so that any libuv request can be cast to uv_req_t. All API functions defined here work with any request type.
The base libuv request structure.
Union of all request types.
Macro that expands to a series of invocations of iter_macro for each of the request types. iter_macro is invoked with two arguments: the name of the uv_req_type element without the UV_ prefix, and the name of the corresponding structure type without the uv_ prefix and _t suffix.
Cancel a pending request. Fails if the request is executing or has finished executing.
Returns 0 on success, or an error code < 0 on failure.
Cancelled requests have their callbacks invoked some time in the future. It’s not safe to free the memory associated with the request until the callback is called.
Here is how cancellation is reported to the callback:
Returns the size of the given request type. Useful for FFI binding writers who don’t want to know the structure layout.