-
Notifications
You must be signed in to change notification settings - Fork 87
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
tokio-rustls: how to use buffering with TlsStream? #136
Comments
I don't think this is correct, it only calls |
My interpretation was that pub fn wants_write(&self) -> bool {
!self.sendable_tls.is_empty()
} |
You seem to be right. given that rustls has a flush method, this seems to be a reserved behavior for rustls. There are two buffer in write direction, one is |
We have a plan to have an unbuffered/write-through API, where rustls doesn't maintain any buffers for the data path. I've made some progress on this over the past year, but the next step is non-trivial to implement. |
I have seen that internally a large read buffer is used. Therefore I do not believe that it makes sense to ever use additional read buffering with TlsStream.
However, poll_write calls the underlying poll_write every time. Would it therefore make sense to use
BufWriter<TlsStream<TcpStream>>
or is thisBufWriter
unnecessary?The text was updated successfully, but these errors were encountered: