Install curl-7.19.5.tar.bz2
[msysgit/bosko.git] / mingw / share / man / man3 / libcurl-share.3
blob95449800da28a314c9dbbf5666bb6d11604c8b43
1 .\" You can view this file with:
2 .\" nroff -man [file]
3 .\" $Id: libcurl-share.3,v 1.2 2004/03/15 10:23:14 bagder Exp $
4 .\"
5 .TH libcurl-share 3 "8 Aug 2003" "libcurl 7.10.7" "libcurl share interface"
6 .SH NAME
7 libcurl-share \- how to use the share interface
8 .SH DESCRIPTION
9 This is an overview on how to use the libcurl share interface in your C
10 programs. There are specific man pages for each function mentioned in
11 here.
13 All functions in the share interface are prefixed with curl_share.
15 .SH "OBJECTIVES"
16 The share interface was added to enable sharing of data between curl
17 \&"handles".
18 .SH "ONE SET OF DATA - MANY TRANSFERS"
19 You can have multiple easy handles share data between them. Have them update
20 and use the \fBsame\fP cookie database or DNS cache! This way, each single
21 transfer will take advantage from data updates made by the other transfer(s).
22 .SH "SHARE OBJECT"
23 You create a shared object with \fIcurl_share_init(3)\fP. It returns a handle
24 for a newly created one.
26 You tell the shared object what data you want it to share by using
27 \fIcurl_share_setopt(3)\fP. Currently you can only share DNS and/or COOKIE
28 data.
30 Since you can use this share from multiple threads, and libcurl has no
31 internal thread synchronization, you must provide mutex callbacks if you're
32 using this multi-threaded. You set lock and unlock functions with
33 \fIcurl_share_setopt(3)\fP too.
35 Then, you make an easy handle to use this share, you set the
36 \fICURLOPT_SHARE\fP option with \fIcurl_easy_setopt(3)\fP, and pass in share
37 handle. You can make any number of easy handles share the same share handle.
39 To make an easy handle stop using that particular share, you set
40 \fICURLOPT_SHARE\fP to NULL for that easy handle. To make a handle stop
41 sharing a particular data, you can \fICURLSHOPT_UNSHARE\fP it.
43 When you're done using the share, make sure that no easy handle is still using
44 it, and call \fIcurl_share_cleanup(3)\fP on the handle.
45 .SH "SEE ALSO"
46 .BR curl_share_init "(3), " curl_share_setopt "(3), " curl_share_cleanup "(3)"