Skip to content

Multi Handle Reference

Qriist edited this page Sep 17, 2026 · 5 revisions

The multi_handle manages a pool of easy_handles for concurrent, non-blocking transfers. This reference lists the core methods which operate on a multi_handle, their primary function, and links to the official libcurl documentation.

Official libcurl Reference

Lifecycle

Method Description libcurl Reference
MultiInit() Creates a new multi handle pool. curl_multi_init
MultiCleanup(multi_handle?) Releases the multi handle and all associated easy handles. curl_multi_cleanup

Pool Management

Method Description libcurl Reference
AddEasyToMulti(easy_handle?, multi_handle?) Links a single easy handle to the multi pool. curl_multi_add_handle
RemoveEasyFromMulti(easy_handle?, multi_handle?) Disassociates an easy handle from the multi pool. curl_multi_remove_handle
ReadyAsync(inEasyHandles?, multi_handle?) Adds one or more easy handles to the pool for async transfer. curl_multi_add_handle
SwapMultiPools(easyHandleArr, oldMultiHandle, newMultiHandle) Transfers easy handles between two multi pools. —
MultiGetHandles(multi_handle?) Lists all easy handles currently in the pool. curl_multi_get_handles

Transfer

Method Description libcurl Reference
Async(multi_handle?) Performs one pass of the transfer cycle for all pooled handles. curl_multi_perform

Configuration

Method Description libcurl Reference
MultiSetOpt(option, parameter, multi_handle?) Sets a pool-level option (e.g., connection limits). curl_multi_setopt
MultiGetOpt(option, multi_handle?) Retrieves the current value of a pool-level option. —

Retrieval & Diagnostics

Method Description libcurl Reference
MultiInfoRead(multi_handle?) Reads completed transfer details from the pool's message queue. curl_multi_info_read
GetMultiInfo(multi_handle?) Returns pool state metrics (running, pending, done, etc.). curl_multi_get_offt
GetMultiErrorString(errornum) Resolves a multi-specific error code to its string description. curl_multi_strerror

Where to Go Next

Clone this wiki locally