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