quickjs-tart

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

CURLOPT_SSH_COMPRESSION.md (1185B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_SSH_COMPRESSION
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_ACCEPT_ENCODING (3)
      9   - CURLOPT_TRANSFER_ENCODING (3)
     10 Protocol:
     11   - SFTP
     12   - SCP
     13 Added-in: 7.56.0
     14 ---
     15 
     16 # NAME
     17 
     18 CURLOPT_SSH_COMPRESSION - enable SSH compression
     19 
     20 # SYNOPSIS
     21 
     22 ~~~c
     23 #include <curl/curl.h>
     24 
     25 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_COMPRESSION, long enable);
     26 ~~~
     27 
     28 # DESCRIPTION
     29 
     30 Pass a long as parameter set to 1L to enable or 0L to disable.
     31 
     32 Enables built-in SSH compression. This is a request, not an order; the server
     33 may or may not do it.
     34 
     35 # DEFAULT
     36 
     37 0, disabled
     38 
     39 # %PROTOCOLS%
     40 
     41 # EXAMPLE
     42 
     43 ~~~c
     44 int main(void)
     45 {
     46   CURL *curl = curl_easy_init();
     47   if(curl) {
     48     curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com");
     49 
     50     /* enable built-in compression */
     51     curl_easy_setopt(curl, CURLOPT_SSH_COMPRESSION, 1L);
     52 
     53     /* Perform the request */
     54     curl_easy_perform(curl);
     55   }
     56 }
     57 ~~~
     58 
     59 # %AVAILABILITY%
     60 
     61 # RETURN VALUE
     62 
     63 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     64 
     65 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     66 libcurl-errors(3).