Annotation of embedaddon/curl/docs/libcurl/opts/CURLOPT_DNS_SHUFFLE_ADDRESSES.3, revision 1.1

1.1     ! misho       1: .\" **************************************************************************
        !             2: .\" *                                  _   _ ____  _
        !             3: .\" *  Project                     ___| | | |  _ \| |
        !             4: .\" *                             / __| | | | |_) | |
        !             5: .\" *                            | (__| |_| |  _ <| |___
        !             6: .\" *                             \___|\___/|_| \_\_____|
        !             7: .\" *
        !             8: .\" * Copyright (C) 1998 - 2018, 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 https://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_DNS_SHUFFLE_ADDRESSES 3 "March 17, 2018" "libcurl 7.70.0" "curl_easy_setopt options"
        !            24: 
        !            25: .SH NAME
        !            26: CURLOPT_DNS_SHUFFLE_ADDRESSES \- Shuffle addresses when a hostname returns more than one
        !            27: .SH SYNOPSIS
        !            28: .nf
        !            29: #include <curl/curl.h>
        !            30: 
        !            31: CURLcode curl_easy_setopt(CURL *handle, CURLOPT_DNS_SHUFFLE_ADDRESSES, long onoff);
        !            32: .fi
        !            33: .SH DESCRIPTION
        !            34: When a name is resolved and more than one IP address is returned, shuffle the
        !            35: order of all returned addresses so that they will be used in a random order.
        !            36: This is similar to the ordering behavior of gethostbyname which is no longer
        !            37: used on most platforms.
        !            38: 
        !            39: Addresses will not be reshuffled if a name resolution is completed using the
        !            40: DNS cache. \fICURLOPT_DNS_CACHE_TIMEOUT(3)\fP can be used together with this
        !            41: option to reduce DNS cache timeout or disable caching entirely if frequent
        !            42: reshuffling is needed.
        !            43: 
        !            44: Since the addresses returned will be reordered randomly, their order will not
        !            45: be in accordance with RFC 3484 or any other deterministic order that may be
        !            46: generated by the system's name resolution implementation. This may have
        !            47: performance impacts and may cause IPv4 to be used before IPv6 or vice versa.
        !            48: .SH DEFAULT
        !            49: 0 (disabled)
        !            50: .SH PROTOCOLS
        !            51: All
        !            52: .SH EXAMPLE
        !            53: .nf
        !            54: CURL *curl = curl_easy_init();
        !            55: if(curl) {
        !            56:   curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
        !            57:   curl_easy_setopt(curl, CURLOPT_DNS_SHUFFLE_ADDRESSES, 1L);
        !            58: 
        !            59:   curl_easy_perform(curl);
        !            60: 
        !            61:   /* always cleanup */
        !            62:   curl_easy_cleanup(curl);
        !            63: }
        !            64: .fi
        !            65: .SH AVAILABILITY
        !            66: Added in 7.60.0
        !            67: .SH RETURN VALUE
        !            68: CURLE_OK or an error such as CURLE_UNKNOWN_OPTION.
        !            69: .SH "SEE ALSO"
        !            70: .BR CURLOPT_DNS_CACHE_TIMEOUT "(3), " CURLOPT_IPRESOLVE "(3), "

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>