pub type WsConnection<IO = TcpOrTlsStream> = WsConnection<IO>;

Aliased Type§

struct WsConnection<IO = TcpOrTlsStream> { /* private fields */ }

Implementations

source§

impl<T> WsConnection<T>where T: AsyncRead + AsyncWrite + Unpin,

source

pub fn with_config(transport: T, config: WsConfig) -> WsConnection<T>

source

pub fn send(&self, kind: WsMessageKind) -> WsSend<T>

source

pub fn err(&self) -> Option<Arc<WsConnectionError>>

Trait Implementations

source§

impl<T> Stream for WsConnection<T>where T: AsyncRead + AsyncWrite + Unpin,

§

type Item = WsMessageReader<T>

Values yielded by the stream.
source§

fn poll_next( self: Pin<&mut WsConnection<T>>, cx: &mut Context<'_> ) -> Poll<Option<<WsConnection<T> as Stream>::Item>>

Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None if the stream is exhausted. Read more
§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the stream. Read more