Vitalii
Vitalii

Reputation: 4793

What `libcurl` options are applied when `curl_easy_send` and `curl_easy_recv` called?

curl_easy_recv and curl_easy_send are useful for custom protocols, so we can rely on well developed curl code for socket, SSL and proxy connection implementation. However, I can not find in documentation what libcurl options are applied when these methods are called.

For example, it is important will apply CURLOPT_TIMEOUT and other connection speed related properties? And what about CURLOPT_CONNECTTIMEOUT?

Are there any documentation that has exact list of options supported by receive and send curl functions?

Upvotes: 2

Views: 217

Answers (1)

Daniel Stenberg
Daniel Stenberg

Reputation: 58114

curl_easy_recv and curl_easy_send are really the bastard children of libcurl. They're totally you asked for it, you got it and basically no options affect them.

No timeout options have any effect, no speed limits or speed caps and no protocol-specific magic. These functions are simply very thin layered on top of the network send/receive functions and that is all they do.

We usually, rather strongly, urge users to avoid using these functions if at all possible. If you do a transfer using a protocol libcurl supports, using these functions is very rarely the right answer.

Upvotes: 1

Related Questions