pub struct WsConn<C> {
read_stream: Mutex<ReadWsStream<C>>,
write_stream: Mutex<WriteWsStream<C>>,
peer_endpoint: Endpoint,
local_endpoint: Endpoint,
}
Expand description
WS network connection implementation of the Connection
trait.
Fields§
§read_stream: Mutex<ReadWsStream<C>>
§write_stream: Mutex<WriteWsStream<C>>
§peer_endpoint: Endpoint
§local_endpoint: Endpoint
Implementations§
Trait Implementations§
Source§impl<C, E> Connection for WsConn<C>where
C: WebSocketCodec<Error = E>,
E: From<Error>,
impl<C, E> Connection for WsConn<C>where
C: WebSocketCodec<Error = E>,
E: From<Error>,
type Message = <C as WebSocketCodec>::Message
type Error = E
Source§fn peer_endpoint(&self) -> Result<Endpoint, Self::Error>
fn peer_endpoint(&self) -> Result<Endpoint, Self::Error>
Returns the remote peer endpoint of this connection
Source§fn local_endpoint(&self) -> Result<Endpoint, Self::Error>
fn local_endpoint(&self) -> Result<Endpoint, Self::Error>
Returns the local socket endpoint of this connection
Auto Trait Implementations§
impl<C> !Freeze for WsConn<C>
impl<C> !RefUnwindSafe for WsConn<C>
impl<C> Send for WsConn<C>where
C: Send,
impl<C> Sync for WsConn<C>where
C: Send,
impl<C> Unpin for WsConn<C>
impl<C> !UnwindSafe for WsConn<C>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more