Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass through AsyncBufRead #2

Open
yoshuawuyts opened this issue Dec 19, 2019 · 3 comments
Open

pass through AsyncBufRead #2

yoshuawuyts opened this issue Dec 19, 2019 · 3 comments

Comments

@yoshuawuyts
Copy link
Contributor

If AsyncBufRead is implemented on T, the stream should expose it. This makes some implementations much more efficient. Thanks!

@dignifiedquire
Copy link
Contributor

dignifiedquire commented Dec 20, 2019

To make this work we need to BufRead to native-tls::TlsStream

for that we need

@yoshuawuyts
Copy link
Contributor Author

Note that we may also need to forward Read for &T and BufRead for &T. Need to verify if we need this tho.

@link2xt
Copy link
Contributor

link2xt commented Mar 3, 2025

tokio-rustls now passes AsyncBufRead through since version 0.26.2:
rustls/tokio-rustls@710cf25

Delta Chat currently can use both async-native-tls (when strict certificate checks are disabled) and tokio-rustls, but always wraps the stream with BufReader anyway because it may be async-native-tls.

Fixing this could prevent such double buffering.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants