GNURLMOPT...NALTY_SIZE(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE β€” chunk length threshold for pipelining, bestie ✨

Okay so this is the <GNURLMOPT...NALTY_SIZE(3)> page from the curl_multi_setopt options manual set, and we are gonna get into it πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

The whole vibe check:

#include <gnurl/curl.h>

CURLMcode curl_multi_setopt(CURLM *handle,
CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, long size);

🌸 DESCRIPTION 🌸

🚨 Big caveat first: no function since pipelining was removed in 7.62.0.

You pass a long with a size in bytes. If a pipelined connection is currently processing a chunked (Transfer-encoding: chunked) request with a current chunk length larger than CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3), that pipeline will not be considered for additional requests, even if it is shorter than CURLMOPT_MAX_PIPELINE_LENGTH(3).

Like, it's giving "this pipeline is on thin ice" energy 😭✨


πŸŽ€ DEFAULT πŸŽ€

The default value is 0, which means that the penalization is inactive. So by default, no penalizing is happening, periodt πŸ’…


πŸ¦‹ PROTOCOLS πŸ¦‹

HTTP(S) β€” that's the whole list, bestie 🌈


πŸ“ EXAMPLE πŸ“

Copy-paste main character energy:

CURLM *m = curl_multi_init();
long maxchunk = 10000;
curl_multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, maxchunk);

⭐ AVAILABILITY ⭐

Added in 7.30.0 β€” iconic, honestly πŸ‘‘


πŸ”₯ RETURN VALUE πŸ”₯

Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not. That's it, no cap 🫢


πŸ’œ SEE ALSO πŸ’œ


kisses bestie πŸ’‹ this page was brought to you by libcurl 7.39.0, dated 4 Nov 2014, and it's literally called GNURLMOPT...NALTY_SIZE(3) πŸŽ€βœ¨

πŸ“¦ where this page comes from