curlGlobalInit             package:RCurl             R Documentation

_S_t_a_r_t _a_n_d _s_t_o_p _t_h_e _C_u_r_l _l_i_b_r_a_r_y

_D_e_s_c_r_i_p_t_i_o_n:

     These functions provide a way to both start/initialize and
     stop/uninitialize the libcurl engine. There is no need to call
     'curlGlobalInit' as it is done implicitly the first time one uses
     the libcurl facilities. However, this function does permit one to
     explicitly control how it is initialized. Specifically, on Windows
     one might want to avoid re-initializing the Win32 socket
     facilities if the  host application (e.g. R) has already done
     this.

     'curlGlobalInit' should only be called once per R session.
     Subsequent calls will have no effect, or may confuse the libcurl
     engine.

     One can reclaim the resources the libcurl engine is consuming via
     the 'curlGlobalCleanup' function when one no longer needs the
     libcurl facilities in an R session.

_U_s_a_g_e:

     curlGlobalInit(flags = c("ssl", "win32"))
     curlGlobalCleanup()

_A_r_g_u_m_e_n_t_s:

   flags: flags indicating which features to activate. These come from
          the 'CurlGlobalBits' bit-field.  The default is to activate
          both SSL and Win32 sockets (if on Windows).  One can specify
          either the names of the features that are matched (via
          'setBitIndicators') or the integer value. 

_V_a_l_u_e:

     'curlGobalInit' returns a status code which should be 0.
     'curlGlobalCleanup' returns 'NULL' in  all cases.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang <duncan@wald.ucdavis.edu>

_R_e_f_e_r_e_n_c_e_s:

     Curl homepage <URL: http://curl.haxx.se>

_S_e_e _A_l_s_o:

     'getCurlHandle'   'curlPerform'

_E_x_a_m_p_l_e_s:

         # Activate only the SSL.
      curlGlobalInit("ssl")

     ## Not run: 
     # Don't run these automatically as we should only call this function
     # once per R session

         # Everything, the default.
      curlGlobalInit()

        # Nothing.
      curlGlobalInit("none")
      curlGlobalInit(0)
     ## End(Not run)

