Class: Ethon::Multi
- Inherits:
-
Object
- Object
- Ethon::Multi
- Includes:
- Ethon::Multies::Operations, Ethon::Multies::Stack
- Defined in:
- lib/ethon/multi.rb
Overview
This class represents libcurl multi.
Class Method Summary collapse
-
.finalizer(multi) ⇒ Object
Frees the libcurl multi handle.
Instance Method Summary collapse
-
#handle ⇒ ::FFI::Pointer
Return the multi handle.
-
#initialize ⇒ Multi
constructor
Create a new multi.
Methods included from Ethon::Multies::Operations
#check, #get_timeout, #init_vars, #ongoing?, #perform, #reset_fds, #run, #running_count, #set_fds, #trigger
Methods included from Ethon::Multies::Stack
Constructor Details
Class Method Details
.finalizer(multi) ⇒ Object
Frees the libcurl multi handle.
19 20 21 22 23 |
# File 'lib/ethon/multi.rb', line 19 def finalizer(multi) proc { Curl.multi_cleanup(multi.handle) } end |
Instance Method Details
#handle ⇒ ::FFI::Pointer
Return the multi handle. Inititialize multi handle, in case it didn’t happened already.
43 44 45 |
# File 'lib/ethon/multi.rb', line 43 def handle @handle ||= Curl.multi_init end |