module Ethon::Multies::Stack
def add(easy)
-
(Ethon::Errors::MultiAdd)
- when adding an easy failed.
Parameters:
-
easy
(Easy
) -- The easy to add.
Other tags:
- Example: Add easy. -
def add(easy) return nil if easy_handles.include?(easy) code = Curl.multi_add_handle(handle, easy.handle) raise Errors::MultiAdd.new(code, easy) unless code == :ok easy_handles << easy end
def delete(easy)
-
(Ethon::Errors::MultiRemove)
- when removing an easy failed.
Parameters:
-
easy
(Easy
) -- The easy to delete.
Other tags:
- Example: Delete easy from stack. -
def delete(easy) if easy_handles.delete(easy) code = Curl.multi_remove_handle(handle, easy.handle) raise Errors::MultiRemove.new(code, handle) unless code == :ok end end
def easy_handles
-
(Array)
- The easy handles.
Other tags:
- Example: Return easy handles. -
def easy_handles @easy_handles ||= [] end