File: curlGlobalInit.Rd

package info (click to toggle)
r-cran-rcurl 1.95-4.8-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,140 kB
  • ctags: 515
  • sloc: ansic: 3,135; xml: 1,734; asm: 993; sh: 12; makefile: 2
file content (70 lines) | stat: -rw-r--r-- 2,072 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
\name{curlGlobalInit}
\alias{curlGlobalInit}
\alias{curlGlobalCleanup}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{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
  \code{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.

  \code{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 \code{curlGlobalCleanup} function
  when one no longer needs the libcurl facilities in
  an R session.
}
\usage{
curlGlobalInit(flags = c("ssl", "win32"))
curlGlobalCleanup()
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{flags}{flags indicating which features to activate.
    These come from the \code{\link{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 \code{\link{setBitIndicators}}) or
    the integer value.
  }
}
\value{
  \code{curlGobalInit} returns a status code which should be 0.
  \code{curlGlobalCleanup} returns \code{NULL} in  all cases.
}


\references{Curl homepage \url{http://curl.haxx.se}}
\author{Duncan Temple Lang <duncan@wald.ucdavis.edu>}

\seealso{
 \code{\link{getCurlHandle}}  
 \code{\link{curlPerform}}
}
\examples{
    # Activate only the SSL.
 curlGlobalInit("ssl")

\dontrun{
# 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)
}

}
\keyword{IO}