From 01f04b9a4127aa2bfb9cdaa8b2d4114268f45514 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 4 Mar 2002 10:09:48 +0000 Subject: ripped out from ../ and put in its own directory now --- docs/libcurl/curl_global_init.3 | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/libcurl/curl_global_init.3 (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 new file mode 100644 index 000000000..ea8419f49 --- /dev/null +++ b/docs/libcurl/curl_global_init.3 @@ -0,0 +1,49 @@ +.\" You can view this file with: +.\" nroff -man [file] +.\" $Id$ +.\" +.TH curl_global_init 3 "13 Nov 2001" "libcurl 7.9.1" "libcurl Manual" +.SH NAME +curl_global_init - Global libcurl initialisation +.SH SYNOPSIS +.B #include +.sp +.BI "CURLcode curl_global_init(long " flags ");" +.ad +.SH DESCRIPTION +This function should only be called once (no matter how many threads or +libcurl sessions that'll be used) by every application that uses libcurl. + +If this function hasn't been invoked when \fIcurl_easy_init\fP is called, it +will be done automatically by libcurl. + +The flags option is a bit pattern that tells libcurl exact what features to +init, as described below. Set the desired bits by ORing the values together. + +You must however \fBalways\fP use the \fIcurl_global_cleanup\fP function, as +that cannot be called automatically for you by libcurl. + +Calling this function more than once will cause unpredictable results. + +This function was added in libcurl 7.8. +.SH FLAGS +.TP 5 +.B CURL_GLOBAL_ALL +Initialize everything possible. This sets all known bits. +.TP +.B CURL_GLOBAL_SSL +Initialize SSL +.TP +.B CURL_GLOBAL_WIN32 +Initialize the Win32 socket libraries. (added in libcurl 7.8.1) +.TP +.B CURL_GLOBAL_NOTHING +Initialise nothing extra. This sets no bit. +.SH RETURN VALUE +If this function returns non-zero, something went wrong and you cannot use the +other curl functions. +.SH "SEE ALSO" +.BR curl_global_cleanup "(3), " +.SH BUGS +None. + -- cgit v1.2.1 From 25bcd45034b2289becfb34a762d5a8c0e9a0c0ef Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 27 Feb 2004 15:34:06 +0000 Subject: formatting update to produce better links with the new roffit version --- docs/libcurl/curl_global_init.3 | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index ea8419f49..04a0b0238 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -14,18 +14,17 @@ curl_global_init - Global libcurl initialisation This function should only be called once (no matter how many threads or libcurl sessions that'll be used) by every application that uses libcurl. -If this function hasn't been invoked when \fIcurl_easy_init\fP is called, it -will be done automatically by libcurl. +If this function hasn't been invoked when \fIcurl_easy_init(3)\fP is called, +it will be done automatically by libcurl. The flags option is a bit pattern that tells libcurl exact what features to init, as described below. Set the desired bits by ORing the values together. -You must however \fBalways\fP use the \fIcurl_global_cleanup\fP function, as -that cannot be called automatically for you by libcurl. +You must however \fBalways\fP use the \fIcurl_global_cleanup(3)\fP function, +as that cannot be called automatically for you by libcurl. Calling this function more than once will cause unpredictable results. -This function was added in libcurl 7.8. .SH FLAGS .TP 5 .B CURL_GLOBAL_ALL @@ -35,7 +34,7 @@ Initialize everything possible. This sets all known bits. Initialize SSL .TP .B CURL_GLOBAL_WIN32 -Initialize the Win32 socket libraries. (added in libcurl 7.8.1) +Initialize the Win32 socket libraries. .TP .B CURL_GLOBAL_NOTHING Initialise nothing extra. This sets no bit. @@ -44,6 +43,5 @@ If this function returns non-zero, something went wrong and you cannot use the other curl functions. .SH "SEE ALSO" .BR curl_global_cleanup "(3), " -.SH BUGS -None. + -- cgit v1.2.1 From bbafb2eb27954c34967f91c705e74cc0c186970d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 11 May 2004 11:30:23 +0000 Subject: curl_global_init_mem() allows the memory functions to be replaced. memory.h is included everywhere for this. --- docs/libcurl/curl_global_init.3 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index 04a0b0238..b408850ad 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -2,7 +2,7 @@ .\" nroff -man [file] .\" $Id$ .\" -.TH curl_global_init 3 "13 Nov 2001" "libcurl 7.9.1" "libcurl Manual" +.TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual" .SH NAME curl_global_init - Global libcurl initialisation .SH SYNOPSIS @@ -42,6 +42,5 @@ Initialise nothing extra. This sets no bit. If this function returns non-zero, something went wrong and you cannot use the other curl functions. .SH "SEE ALSO" +.BR curl_global_init_mem "(3), " .BR curl_global_cleanup "(3), " - - -- cgit v1.2.1 From 598965a6061e7c6d6adadf104c84bc7cd6cdeb07 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 23 Dec 2005 23:22:23 +0000 Subject: clarified that curl_global_init() isn't thread-safe and that it might affect curl_easy_init() if you don't call curl_global_init() explicitly in your app --- docs/libcurl/curl_global_init.3 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index b408850ad..8e8ec09f4 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -15,7 +15,8 @@ This function should only be called once (no matter how many threads or libcurl sessions that'll be used) by every application that uses libcurl. If this function hasn't been invoked when \fIcurl_easy_init(3)\fP is called, -it will be done automatically by libcurl. +it will be done automatically by libcurl. It is adviced that you do not rely +on this automatic call, but instead call \fIcurl_global_init(3)\fP properly. The flags option is a bit pattern that tells libcurl exact what features to init, as described below. Set the desired bits by ORing the values together. @@ -23,8 +24,9 @@ init, as described below. Set the desired bits by ORing the values together. You must however \fBalways\fP use the \fIcurl_global_cleanup(3)\fP function, as that cannot be called automatically for you by libcurl. -Calling this function more than once will cause unpredictable results. - +Calling this function more than once will cause unpredictable results. If that +is not enough, calling this function from more than one thread may also cause +unpredictable results. .SH FLAGS .TP 5 .B CURL_GLOBAL_ALL @@ -44,3 +46,4 @@ other curl functions. .SH "SEE ALSO" .BR curl_global_init_mem "(3), " .BR curl_global_cleanup "(3), " +.BR curl_easy_init "(3) " \ No newline at end of file -- cgit v1.2.1 From 4c35a40858db71daa0f6be4111c620fb201f245a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 15 Jan 2006 23:55:53 +0000 Subject: Bryan Henderson turned the 'initialized' variable for curl_global_init() into a counter, and thus you can now do multiple curl_global_init() and you are then supposed to do the same amount of calls to curl_global_cleanup(). Bryan also updated the docs accordingly. --- docs/libcurl/curl_global_init.3 | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index 8e8ec09f4..0729ef787 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -11,22 +11,31 @@ curl_global_init - Global libcurl initialisation .BI "CURLcode curl_global_init(long " flags ");" .ad .SH DESCRIPTION -This function should only be called once (no matter how many threads or -libcurl sessions that'll be used) by every application that uses libcurl. +This function sets up the program environment that libcurl needs. Think +of it as an extension of the library loader. -If this function hasn't been invoked when \fIcurl_easy_init(3)\fP is called, -it will be done automatically by libcurl. It is adviced that you do not rely -on this automatic call, but instead call \fIcurl_global_init(3)\fP properly. +This function must be called at least once within a program (a program is +all the code that shares a memory space) before the program calls any other +function in libcurl. The environment it sets up is constant for the life +of the program and is the same for every program, so multiple calls have +the same effect as one call. -The flags option is a bit pattern that tells libcurl exact what features to +The flags option is a bit pattern that tells libcurl exactly what features to init, as described below. Set the desired bits by ORing the values together. +In normal operation, you must specify CURL_GLOBAL_ALL. Don't use any other +value unless you are familiar with and mean to control internal operations +of libcurl. -You must however \fBalways\fP use the \fIcurl_global_cleanup(3)\fP function, -as that cannot be called automatically for you by libcurl. +\fBThis function is not thread safe.\fP You must not call it when any +other thread in the program (i.e. a thread sharing the same memory) is +running. This doesn't just mean no other thread that is using +libcurl. Because \fIcurl_global_init()\fP calls functions of other +libraries that are similarly thread unsafe, it could conflict with any +other thread that uses these other libraries. + +See the description in \fBlibcurl\fP(3) of global environment +requirements for details of how to use this function. -Calling this function more than once will cause unpredictable results. If that -is not enough, calling this function from more than one thread may also cause -unpredictable results. .SH FLAGS .TP 5 .B CURL_GLOBAL_ALL @@ -46,4 +55,5 @@ other curl functions. .SH "SEE ALSO" .BR curl_global_init_mem "(3), " .BR curl_global_cleanup "(3), " -.BR curl_easy_init "(3) " \ No newline at end of file +.BR curl_easy_init "(3) " +.BR libcurl "(3) " -- cgit v1.2.1 From 6f6b93da02019141812b81bfdbb6bcda430c3b4d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 26 Jul 2006 22:19:42 +0000 Subject: [Hiper-related work] Added a function called curl_multi_assign() that will set a private pointer added to the internal libcurl hash table for the particular socket passed in to this function. --- docs/libcurl/curl_global_init.3 | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index 0729ef787..ba15ad4e0 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -11,30 +11,30 @@ curl_global_init - Global libcurl initialisation .BI "CURLcode curl_global_init(long " flags ");" .ad .SH DESCRIPTION -This function sets up the program environment that libcurl needs. Think -of it as an extension of the library loader. +This function sets up the program environment that libcurl needs. Think of it +as an extension of the library loader. -This function must be called at least once within a program (a program is -all the code that shares a memory space) before the program calls any other -function in libcurl. The environment it sets up is constant for the life -of the program and is the same for every program, so multiple calls have -the same effect as one call. +This function must be called at least once within a program (a program is all +the code that shares a memory space) before the program calls any other +function in libcurl. The environment it sets up is constant for the life of +the program and is the same for every program, so multiple calls have the same +effect as one call. The flags option is a bit pattern that tells libcurl exactly what features to init, as described below. Set the desired bits by ORing the values together. In normal operation, you must specify CURL_GLOBAL_ALL. Don't use any other -value unless you are familiar with and mean to control internal operations -of libcurl. +value unless you are familiar with and mean to control internal operations of +libcurl. -\fBThis function is not thread safe.\fP You must not call it when any -other thread in the program (i.e. a thread sharing the same memory) is -running. This doesn't just mean no other thread that is using -libcurl. Because \fIcurl_global_init()\fP calls functions of other -libraries that are similarly thread unsafe, it could conflict with any -other thread that uses these other libraries. +\fBThis function is not thread safe.\fP You must not call it when any other +thread in the program (i.e. a thread sharing the same memory) is running. +This doesn't just mean no other thread that is using libcurl. Because +\fIcurl_global_init()\fP calls functions of other libraries that are similarly +thread unsafe, it could conflict with any other thread that uses these other +libraries. -See the description in \fBlibcurl\fP(3) of global environment -requirements for details of how to use this function. +See the description in \fBlibcurl\fP(3) of global environment requirements for +details of how to use this function. .SH FLAGS .TP 5 -- cgit v1.2.1 From f61cfc59314e4779c13312efc4845f580f0933b1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 28 Dec 2008 21:56:56 +0000 Subject: Anthony Bryan's man page cleanup in language and spelling --- docs/libcurl/curl_global_init.3 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index ba15ad4e0..fad153b6f 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -23,7 +23,7 @@ effect as one call. The flags option is a bit pattern that tells libcurl exactly what features to init, as described below. Set the desired bits by ORing the values together. In normal operation, you must specify CURL_GLOBAL_ALL. Don't use any other -value unless you are familiar with and mean to control internal operations of +value unless you are familiar with it and mean to control internal operations of libcurl. \fBThis function is not thread safe.\fP You must not call it when any other -- cgit v1.2.1 From 2309b4e330b96bc2e1f8e36b6184015e59544037 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 24 Mar 2010 11:02:54 +0100 Subject: remove the CVSish $Id$ lines --- docs/libcurl/curl_global_init.3 | 1 - 1 file changed, 1 deletion(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index fad153b6f..e732911f8 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -1,6 +1,5 @@ .\" You can view this file with: .\" nroff -man [file] -.\" $Id$ .\" .TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual" .SH NAME -- cgit v1.2.1 From 029136da6054a3b2d6cb36b3b4f2ed34f83e010a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 12 Mar 2011 00:14:32 +0100 Subject: source header: added to more files --- docs/libcurl/curl_global_init.3 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index e732911f8..5fff6c556 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -1,6 +1,24 @@ -.\" You can view this file with: -.\" nroff -man [file] -.\" +.\" ************************************************************************** +.\" * _ _ ____ _ +.\" * Project ___| | | | _ \| | +.\" * / __| | | | |_) | | +.\" * | (__| |_| | _ <| |___ +.\" * \___|\___/|_| \_\_____| +.\" * +.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +.\" * +.\" * This software is licensed as described in the file COPYING, which +.\" * you should have received as part of this distribution. The terms +.\" * are also available at http://curl.haxx.se/docs/copyright.html. +.\" * +.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell +.\" * copies of the Software, and permit persons to whom the Software is +.\" * furnished to do so, under the terms of the COPYING file. +.\" * +.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +.\" * KIND, either express or implied. +.\" * +.\" ************************************************************************** .TH curl_global_init 3 "11 May 2004" "libcurl 7.12" "libcurl Manual" .SH NAME curl_global_init - Global libcurl initialisation -- cgit v1.2.1 From b7298e49ae1a97ca9b53b29efc95bd1b7fee5dcf Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Jul 2012 08:40:43 +0200 Subject: docs: mention CURL_GLOBAL_DEFAULT --- docs/libcurl/curl_global_init.3 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/libcurl/curl_global_init.3') diff --git a/docs/libcurl/curl_global_init.3 b/docs/libcurl/curl_global_init.3 index 5fff6c556..d91e1bdb7 100644 --- a/docs/libcurl/curl_global_init.3 +++ b/docs/libcurl/curl_global_init.3 @@ -5,7 +5,7 @@ .\" * | (__| |_| | _ <| |___ .\" * \___|\___/|_| \_\_____| .\" * -.\" * Copyright (C) 1998 - 2011, Daniel Stenberg, , et al. +.\" * Copyright (C) 1998 - 2012, Daniel Stenberg, , et al. .\" * .\" * This software is licensed as described in the file COPYING, which .\" * you should have received as part of this distribution. The terms @@ -66,6 +66,10 @@ Initialize the Win32 socket libraries. .TP .B CURL_GLOBAL_NOTHING Initialise nothing extra. This sets no bit. +.TP +.B CURL_GLOBAL_DEFAULT +A sensible default. It will init both SSL and Win32. Right now, this equals +the functionality of the \fBCURL_GLOBAL_ALL\fP mask. .SH RETURN VALUE If this function returns non-zero, something went wrong and you cannot use the other curl functions. -- cgit v1.2.1