|
|
|
@ -63,7 +63,7 @@ use compat::{cvt, AllowStd, ContextWaker}; |
|
|
|
|
use futures_io::{AsyncRead, AsyncWrite}; |
|
|
|
|
use futures_util::{ |
|
|
|
|
sink::{Sink, SinkExt}, |
|
|
|
|
stream::Stream, |
|
|
|
|
stream::{FusedStream, Stream}, |
|
|
|
|
}; |
|
|
|
|
use log::*; |
|
|
|
|
use std::pin::Pin; |
|
|
|
@ -343,6 +343,15 @@ where |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl<T> FusedStream for WebSocketStream<T> |
|
|
|
|
where |
|
|
|
|
T: AsyncRead + AsyncWrite + Unpin, |
|
|
|
|
{ |
|
|
|
|
fn is_terminated(&self) -> bool { |
|
|
|
|
self.ended |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl<T> Sink<Message> for WebSocketStream<T> |
|
|
|
|
where |
|
|
|
|
T: AsyncRead + AsyncWrite + Unpin, |
|
|
|
|