Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

curlGlobalInit

Start and stop the Curl library


Description

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.

Usage

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

Arguments

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.

Value

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

Author(s)

Duncan Temple Lang

References

Curl homepage http://curl.haxx.se

See Also

Examples

# 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)

RCurl

General Network (HTTP/FTP/...) Client Interface for R

v1.98-1.3
BSD_3_clause + file LICENSE
Authors
CRAN Team [ctb, cre] (de facto maintainer since 2013), Duncan Temple Lang [aut] (<https://orcid.org/0000-0003-0159-1546>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.