Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi: add curl_multi_init2 for advanced multi init
Allow initializing a multi with a specific socket table hash size, connection cache hash size, and flags. Flag CURL_MULTI_DISABLE_POLL_WAKEUP can be used to disable the curl_multi_poll wakeup socketpair. A user requested the option to disable creating those sockets due to resource constraints. Prior to this change it was not possible to disable the wakeup socketpair (added in 7.68.0) used by the multi. Reported-by: Anders Bakken Fixes curl#4829 Closes #xxxx
- Loading branch information
Showing
11 changed files
with
132 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
.\" ************************************************************************** | ||
.\" * _ _ ____ _ | ||
.\" * Project ___| | | | _ \| | | ||
.\" * / __| | | | |_) | | | ||
.\" * | (__| |_| | _ <| |___ | ||
.\" * \___|\___/|_| \_\_____| | ||
.\" * | ||
.\" * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, 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 https://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_multi_init2 3 "21 January 2020" "libcurl 7.69.0" "libcurl Manual" | ||
.SH NAME | ||
curl_multi_init2 - create a multi handle with advanced init options | ||
.SH SYNOPSIS | ||
.B #include <curl/curl.h> | ||
.sp | ||
.BI "CURLM *curl_multi_init2(int" socket_table_hashsize "," | ||
.BI "int" conn_cache_hashsize ", int" flags ");" | ||
.ad | ||
.SH DESCRIPTION | ||
This function returns a CURLM handle to be used as input to all the other | ||
multi-functions, sometimes referred to as a multi handle in some places in the | ||
documentation. This init call MUST have a corresponding call to | ||
\fIcurl_multi_cleanup(3)\fP when the operation is complete. | ||
|
||
\fBsocket_table_hashsize\fP sets the size of the hash table used to keep track | ||
of sockets. \fBconnection_hashsize\fP sets the size of the hash table used to | ||
keep track of the connections. Set both options to 0 to use the default values | ||
unless a curl developer says otherwise. | ||
|
||
\fBflags\fP refer to the FLAGS section below. | ||
|
||
\fIcurl_multi_init(3)\fP is the same as this function except that it doesn't | ||
allow setting advanced init options. | ||
.SH FLAGS | ||
.IP CURL_MULTI_DISABLE_POLL_WAKEUP | ||
Since 7.68.0 each multi has a wakeup socket pair to allow waking | ||
\fIcurl_multi_poll(3)\fP from a different thread. The wakeup socket pair is 2 | ||
sockets that remain open for the life of the multi. If your socket resources | ||
are very limited you can use this flag to disable the wakeup socket pair. Note | ||
\fIcurl_multi_wakeup(3)\fP will return an error if there is no wakeup socket | ||
pair. | ||
.SH AVAILABILITY | ||
7.69.0 | ||
.SH RETURN VALUE | ||
If this function returns NULL, something went wrong and you cannot use the | ||
other curl functions. | ||
.SH "SEE ALSO" | ||
.BR curl_multi_init "(3)" | ||
.BR curl_multi_cleanup "(3)," curl_global_init "(3)," curl_easy_init "(3)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters