CURLMOPT_PIPELINING.3 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .\" generated by cd2nroff 0.1 from CURLMOPT_PIPELINING.md
  2. .TH CURLMOPT_PIPELINING 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLMOPT_PIPELINING \- enable HTTP multiplexing
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bitmask);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass in the correct value in the \fBbitmask\fP parameter to instruct libcurl to
  12. enable multiplexing for this multi handle.
  13. With multiplexing enabled, libcurl attempts to do multiple transfers over the
  14. same connection when doing parallel transfers to the same hosts.
  15. .IP "CURLPIPE_NOTHING (0)"
  16. Default, which means doing no attempts at multiplexing.
  17. .IP "CURLPIPE_HTTP1 (1)"
  18. This bit is deprecated and has no effect since version 7.62.0.
  19. .IP "CURLPIPE_MULTIPLEX (2)"
  20. If this bit is set, libcurl tries to multiplex the new transfer over an
  21. existing connection if possible. This requires HTTP/2 or HTTP/3.
  22. .SH DEFAULT
  23. \fBCURLPIPE_MULTIPLEX\fP
  24. .SH PROTOCOLS
  25. This functionality affects http only
  26. .SH EXAMPLE
  27. .nf
  28. int main(void)
  29. {
  30. CURLM *m = curl_multi_init();
  31. /* try HTTP/2 multiplexing */
  32. curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
  33. }
  34. .fi
  35. .SH HISTORY
  36. The multiplex support bit was added in 7.43.0. HTTP/1 Pipelining support was
  37. disabled in 7.62.0.
  38. Since 7.62.0, \fBCURLPIPE_MULTIPLEX\fP is enabled by default.
  39. Before that, default was \fBCURLPIPE_NOTHING\fP.
  40. .SH AVAILABILITY
  41. Added in curl 7.16.0
  42. .SH RETURN VALUE
  43. Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
  44. .SH SEE ALSO
  45. .BR CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE (3),
  46. .BR CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE (3),
  47. .BR CURLMOPT_MAXCONNECTS (3),
  48. .BR CURLMOPT_MAX_HOST_CONNECTIONS (3),
  49. .BR CURLMOPT_MAX_PIPELINE_LENGTH (3),
  50. .BR CURLMOPT_PIPELINING_SITE_BL (3)