module Ethon::Curl

def init

Experimental RBS support (using type sampling data from the type_fusion project).

def init: () -> (nil | true | Integer)

This signature was generated using 34 samples from 3 applications.

Raises:
  • (Ethon::Errors::GlobalInit) - If Curl.global_init fails.
def init
  @@curl_mutex.synchronize {
    if not @@initialized
      raise Errors::GlobalInit.new if Curl.global_init(GLOBAL_ALL) != 0
      @@initialized = true
      Ethon.logger.debug("ETHON: Libcurl initialized") if Ethon.logger
    end
  }
end