Add implementations of prepare_uninitialized_buffer and read_buf where relevant (#1107)

* Fix #1080

* Fix browser WebSockets
This commit is contained in:
Pierre Krieger
2019-05-10 11:26:18 +02:00
committed by GitHub
parent 089e349671
commit c2398adf67
19 changed files with 121 additions and 8 deletions

View File

@ -335,7 +335,11 @@ impl<T: io::Write> io::Write for NoiseOutput<T> {
}
}
impl<T: AsyncRead> AsyncRead for NoiseOutput<T> {}
impl<T: AsyncRead> AsyncRead for NoiseOutput<T> {
unsafe fn prepare_uninitialized_buffer(&self, _: &mut [u8]) -> bool {
false
}
}
impl<T: AsyncWrite> AsyncWrite for NoiseOutput<T> {
fn shutdown(&mut self) -> Poll<(), io::Error> {