5f64195987261e59b6d50d7807138d8a07c28d18
[platform/upstream/curl.git] / docs / libcurl / opts / CURLOPT_PIPEWAIT.3
1 .\" **************************************************************************
2 .\" *                                  _   _ ____  _
3 .\" *  Project                     ___| | | |  _ \| |
4 .\" *                             / __| | | | |_) | |
5 .\" *                            | (__| |_| |  _ <| |___
6 .\" *                             \___|\___/|_| \_\_____|
7 .\" *
8 .\" * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
9 .\" *
10 .\" * This software is licensed as described in the file COPYING, which
11 .\" * you should have received as part of this distribution. The terms
12 .\" * are also available at http://curl.haxx.se/docs/copyright.html.
13 .\" *
14 .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
15 .\" * copies of the Software, and permit persons to whom the Software is
16 .\" * furnished to do so, under the terms of the COPYING file.
17 .\" *
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
20 .\" *
21 .\" **************************************************************************
22 .\"
23 .TH CURLOPT_PIPEWAIT 3 "12 May 2015" "libcurl 7.43.0" "curl_easy_setopt options"
24 .SH NAME
25 CURLOPT_PIPEWAIT \- wait for pipelining/multiplexing
26 .SH SYNOPSIS
27 #include <curl/curl.h>
28
29 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PIPEWAIT, long wait);
30 .SH DESCRIPTION
31 Set \fIwait\fP to 1L to tell libcurl to prefer to wait for a connection to
32 confirm or deny that it can do pipelining or multiplexing before continuing.
33
34 When about to perform a new transfer that allows pipelining or multiplexing,
35 libcurl will check for existing connections to re-use and pipeline on. If no
36 such connection exists it will immediately continue and create a fresh new
37 connection to use.
38
39 By setting this option to 1 - and having \fICURLMOPT_PIPELINE\fP enabled for
40 the multi handle this transfer is associated with - libcurl will instead wait
41 for the connection to reveal if it is possible to pipeline/multiplex on before
42 it continues. This enables libcurl to much better keep the number of
43 connections to a minimum when using pipelining or multiplexing protocols.
44
45 The effect thus becomes that with this option set, libcurl prefers to wait and
46 re-use an existing connection for pipelining rather than the opposite: prefer
47 to open a new connection rather than waiting.
48
49 The waiting time is as long as it takes for the connection to get up and for
50 libcurl to get the necessary response back that informs it about its protocol
51 and support level.
52 .SH DEFAULT
53 0 (off)
54 .SH PROTOCOLS
55 HTTP(S)
56 .SH EXAMPLE
57 .SH AVAILABILITY
58 Added in 7.43.0
59 .SH RETURN VALUE
60 Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
61 .SH "SEE ALSO"
62 .BR CURLOPT_FORBID_REUSE "(3), " CURLOPT_FRESH_CONNECT "(3), "
63 .BR CURLMOPT_PIPELINING "(3), " CURLMOPT_MAX_HOST_CONNECTIONS "(3), "