`SSLSocket.sendfile` and Kernel TLS

Hi there,

OpenSSL 3.0 added an SSL_sendfile function that can be used by Python potentially for sending files via TLS more efficiently.

I would like to try integrating SSL_sendfile in SSLSocket.sendfile, I do not expect any visible changes in the public API.
But I still doubt if this is a wanted change since SSL_sendfile is available only in OpenSSL 3 when Kernel TLS is enabled.

Could you please share your thoughts on this?


It seems like a good feature to add. It should be a transparent performance win for people running a recent enough OpenSSL and OS kernel.