7.3Class Multi

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
addAdds an Handle instance to the multi interface.
performStarts or proceeds with the transfers.
removeAdds an Handle instance to the multi interface.

Methods

add

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.

perform

Starts or proceeds with the transfers.

Multi.perform()
ReturnThe 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.

remove

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.

Made with http://www.falconpl.org