Interface to CURL multi_* operations.
Class Multi( [...] )
... | Handle instances to be immediately added. |
The Multi interface is meant to perform multiple CURL connections handled by a single application.
A Multi instance lifetime is usually like the following:
For example, a minimal operation may be like the following:
import from curl h1 = curl.Handle( "http://www.falconpl.org" ).setOutString() h2 = curl.Handle( "http://www.google.com" ).setOutString() hm = curl.Multi( h1, h2 ) loop v = hm.perform() > "Currently ", v, " transfers ongoing." sleep(0.1) end v == 0 > h1.getData() > h2.getData()
Methods | |
add | Adds an Handle instance to the multi interface. |
perform | Starts or proceeds with the transfers. |
remove | Adds an Handle instance to the multi interface. |
Adds an Handle instance to the multi interface.
Multi.add( h )
h | The Handle instance to be added. |
Adds a handle to an existing curl multihandle.
Starts or proceeds with the transfers.
Multi.perform()
Return | The count of remaining operations to be handled. |
The calling application should call repeatedly this method until it returns 0, indicating that all the transfers are compelete.
Adds an Handle instance to the multi interface.
Multi.remove( h )
h | The Handle instance to be added. |
Adds a handle to an existing curl multihandle.