On 3/12/2021 11:45 PM, Jacob Hoffman-Andrews via curl-library wrote:
Currently the rustls backend uses a buffer on the stack for its `send` / `recv` implementations. I'd like to switch this to be a heap-allocated buffer, initialized once and stored in the `connssl->backend` struct. Is it guaranteed that `send` and `recv` are never called concurrently? In general what are the concurrency properties that apply to TLS backends?

curl handles can't be used from multiple threads at the same time [1] and because of that I'm pretty sure it's not possible. Note cached connections can be shared between threads (but there is a concurrency bug in that). Daniel will have to elaborate on the intentions here but I'm pretty sure based on the way it's documented [2] that it's not possible.

[1]: https://curl.se/libcurl/c/threadsafe.html
[2]: https://curl.se/libcurl/c/curl_share_setopt.html


-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to