Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flush method to ensure frame is correctly written (#88)
When the underlying stream is buffered (i.e: TlsStream<TcpStream>) calling write_frame is not enough to be guaranteed that data is pushed down to the last stream (i.e: on the network in case of TlsStream<TcpStream>). Currently there is no way to force flush the data on the stream, so write_frame call may never push the data. https://docs.rs/tokio-rustls/latest/tokio_rustls/index.html#why-do-i-need-to-call-poll_flush The commit introduce a flush method, to allow the user of the lib to ensure all data is correctly pushed down.
- Loading branch information