From 8fa43b469a221a6f87ade73b077a6178d6b8e4b7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 11 Aug 2003 07:25:02 +0000 Subject: documenting the share interface --- docs/libcurl/libcurl-share.3 | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 docs/libcurl/libcurl-share.3 (limited to 'docs/libcurl/libcurl-share.3') diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 new file mode 100644 index 000000000..6a8e22fb3 --- /dev/null +++ b/docs/libcurl/libcurl-share.3 @@ -0,0 +1,46 @@ +.\" You can view this file with: +.\" nroff -man [file] +.\" $Id$ +.\" +.TH libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface" +.SH NAME +libcurl-share \- how to use the share interface +.SH DESCRIPTION +This is an overview on how to use the libcurl share interface in your C +programs. There are specific man pages for each function mentioned in +here. + +All functions in the share interface are prefixed with curl_share. + +.SH "OBJECTIVES" +The share interface was added to enable sharing of data between curl +\&"handles". +.SH "ONE SET OF DATA - MANY TRANSFERS" +You can have multiple easy handles share data between them. Have them update +and use the \fBsame\fP cookie database or DNS cache! This way, each single +transfer will take advantage from data updates made by the other transfer(s). +.SH "SHARE OBJECT" +You create a shared object with \fIcurl_share_init()\fP. It returns a handle +for a newly created one. + +You tell the shared object what data you want it to share by using +\fIcurl_share_setopt()\fP. Currently you can only share DNS and/or COOKIE +data. + +Since you can use this share from multiple threads, and libcurl has no +internal thread synchronization, you must provide mutex callbacks if you're +using this multi-threaded. You set lock and unlock functions with +\fIcurl_share_setopt()\fP too. + +Then, you make an easy handle to use this share, you set the CURLOPT_SHARE +option with \fIcurl_easy_setopt\fP, and pass in share handle. You can make any +number of easy handles share the same share handle. + +To make an easy handle stop using that particular share, you set CURLOPT_SHARE +to NULL for that easy handle. To make a handle stop sharing a particular data, +you can CURLSHOPT_UNSHARE it. + +When you're done using the share, make sure that no easy handle is still using +it, and call \fIcurl_share_cleanup()\fP on the handle. +.SH "SEE ALSO" +.BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)" -- cgit v1.2.1 From 4ebf4f6e55e62ebf039453a4b1f79aeb85662fb8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 15 Mar 2004 10:23:14 +0000 Subject: better mentioning of other functions to create proper hrefs in the web version --- docs/libcurl/libcurl-share.3 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'docs/libcurl/libcurl-share.3') diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index 6a8e22fb3..4745c122e 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.3 @@ -20,27 +20,27 @@ You can have multiple easy handles share data between them. Have them update and use the \fBsame\fP cookie database or DNS cache! This way, each single transfer will take advantage from data updates made by the other transfer(s). .SH "SHARE OBJECT" -You create a shared object with \fIcurl_share_init()\fP. It returns a handle +You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle for a newly created one. You tell the shared object what data you want it to share by using -\fIcurl_share_setopt()\fP. Currently you can only share DNS and/or COOKIE +\fIcurl_share_setopt(3)\fP. Currently you can only share DNS and/or COOKIE data. Since you can use this share from multiple threads, and libcurl has no internal thread synchronization, you must provide mutex callbacks if you're using this multi-threaded. You set lock and unlock functions with -\fIcurl_share_setopt()\fP too. +\fIcurl_share_setopt(3)\fP too. -Then, you make an easy handle to use this share, you set the CURLOPT_SHARE -option with \fIcurl_easy_setopt\fP, and pass in share handle. You can make any -number of easy handles share the same share handle. +Then, you make an easy handle to use this share, you set the +\fICURLOPT_SHARE\fP option with \fIcurl_easy_setopt(3)\fP, and pass in share +handle. You can make any number of easy handles share the same share handle. -To make an easy handle stop using that particular share, you set CURLOPT_SHARE -to NULL for that easy handle. To make a handle stop sharing a particular data, -you can CURLSHOPT_UNSHARE it. +To make an easy handle stop using that particular share, you set +\fICURLOPT_SHARE\fP to NULL for that easy handle. To make a handle stop +sharing a particular data, you can \fICURLSHOPT_UNSHARE\fP it. When you're done using the share, make sure that no easy handle is still using -it, and call \fIcurl_share_cleanup()\fP on the handle. +it, and call \fIcurl_share_cleanup(3)\fP on the handle. .SH "SEE ALSO" .BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)" -- 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/libcurl-share.3 | 1 - 1 file changed, 1 deletion(-) (limited to 'docs/libcurl/libcurl-share.3') diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index 4745c122e..2e58c0ba6 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.3 @@ -1,6 +1,5 @@ .\" You can view this file with: .\" nroff -man [file] -.\" $Id$ .\" .TH libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface" .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/libcurl-share.3 | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'docs/libcurl/libcurl-share.3') diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index 2e58c0ba6..fc624088e 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.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 libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface" .SH NAME libcurl-share \- how to use the share interface -- cgit v1.2.1 From 4eec66e479a5a2938dc186b763fdcb12a39718ed Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 27 Aug 2012 23:49:08 +0200 Subject: libcurl-share.3: remove wrong info of what can be shared "Currently you can only share DNS and/or COOKIE data" is incorrect since also SSL sessions can be shared. Bug: http://curl.haxx.se/bug/view.cgi?id=3562261 Reported by: Joe Mason --- docs/libcurl/libcurl-share.3 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'docs/libcurl/libcurl-share.3') diff --git a/docs/libcurl/libcurl-share.3 b/docs/libcurl/libcurl-share.3 index fc624088e..583902152 100644 --- a/docs/libcurl/libcurl-share.3 +++ b/docs/libcurl/libcurl-share.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 @@ -41,8 +41,7 @@ You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle for a newly created one. You tell the shared object what data you want it to share by using -\fIcurl_share_setopt(3)\fP. Currently you can only share DNS and/or COOKIE -data. +\fIcurl_share_setopt(3)\fP. Since you can use this share from multiple threads, and libcurl has no internal thread synchronization, you must provide mutex callbacks if you're -- cgit v1.2.1