quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLOPT_SASL_IR.md (1453B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_SASL_IR
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_MAIL_AUTH (3)
      9   - CURLOPT_MAIL_FROM (3)
     10   - CURLOPT_SASL_AUTHZID (3)
     11 Protocol:
     12   - SMTP
     13   - IMAP
     14 Added-in: 7.31.0
     15 ---
     16 
     17 # NAME
     18 
     19 CURLOPT_SASL_IR - send initial response in first packet
     20 
     21 # SYNOPSIS
     22 
     23 ~~~c
     24 #include <curl/curl.h>
     25 
     26 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable);
     27 ~~~
     28 
     29 # DESCRIPTION
     30 
     31 Pass a long. If the value is 1, curl sends the initial response to the server
     32 in the first authentication packet in order to reduce the number of ping pong
     33 requests. Only applicable to the following supporting SASL authentication
     34 mechanisms:
     35 
     36 * Login
     37 * Plain
     38 * GSSAPI
     39 * NTLM
     40 * OAuth 2.0
     41 
     42 Note: Whilst IMAP supports this option there is no need to explicitly set it,
     43 as libcurl can determine the feature itself when the server supports the
     44 SASL-IR CAPABILITY.
     45 
     46 # DEFAULT
     47 
     48 0
     49 
     50 # %PROTOCOLS%
     51 
     52 # EXAMPLE
     53 
     54 ~~~c
     55 int main(void)
     56 {
     57   CURL *curl = curl_easy_init();
     58   if(curl) {
     59     CURLcode res;
     60     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     61     curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L);
     62     res = curl_easy_perform(curl);
     63     curl_easy_cleanup(curl);
     64   }
     65 }
     66 ~~~
     67 
     68 # %AVAILABILITY%
     69 
     70 # RETURN VALUE
     71 
     72 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     73 
     74 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     75 libcurl-errors(3).