.\" -*- mode: troff; coding: utf-8 -*-
.TH "TclCurl Share" "n" "19-05-2026" "TclCurl 8.0.3" "TclCurl Easy Interface"
.SH NAME
.LP
TclCurl - Share selected data between multiple easy handles.
.SH SYNOPSIS
.LP
.EX
curl::shareinit
curl::sharestrerror errorCode
.EE
.LP
.EX
shareHandle share ?data?
shareHandle unshare ?data?
shareHandle cleanup
.EE
.SH DESCRIPTION
.LP
The share API allows two or more easy handles to share selected kinds of data.
At present, TclCurl supports sharing cookie data and DNS cache data.
.SH curl::shareinit
.LP
This procedure must be called first. It returns a \f(CRshareHandle\fR, which you use
to share data between easy handles through the \f(CR-share\fR option of the
\f(CRconfigure\fR command. Each call to \f(CRshareinit\fR MUST have a corresponding call
to \f(CRcleanup\fR when the operation is complete.
.PP
\fBRETURN VALUE\fR
.PP
The \f(CRshareHandle\fR to use.
.SH shareHandle share ?data?
.LP
This parameter specifies the kind of data to be shared. It may be set to one
of the values described below:
.TP 3
\f(CRcookies\fR
Cookie data is shared between the easy handles associated with this shared
object.
.TP 3
\f(CRdns\fR
Cached DNS entries are shared between the easy handles associated with
this shared object.
.IP
Note that when you use the multi interface, all easy handles added to the
same multi handle share DNS cache by default, without requiring this
setting.
.SH shareHandle unshare ?data?
.LP
This command does the opposite of \f(CRshare\fR. The specified data type will no
longer be shared. Valid values are the same as for \f(CRshare\fR.
.SH shareHandle cleanup
.LP
Deletes a shared object. After this command has been called, the share handle
can no longer be used.
.SH curl::sharestrerror errorCode
.LP
This procedure returns a string describing the error code passed in the
argument.
.SH SEE ALSO
.LP
curl, TclCurl
