pub struct Connection<S = MaybeTlsStream<TcpStream>> { /* private fields */ }Expand description
WebSocket connection wrapper around a Tokio Tungstenite stream.
Implementations§
Source§impl<S> Connection<S>
impl<S> Connection<S>
Source§impl<S> Connection<S>
impl<S> Connection<S>
Sourcepub fn peer_addr(&self) -> SocketAddr
pub fn peer_addr(&self) -> SocketAddr
Return the peer address.
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
Return the local address.
Trait Implementations§
Auto Trait Implementations§
impl<S = MaybeTlsStream<TcpStream>> !Freeze for Connection<S>
impl<S = MaybeTlsStream<TcpStream>> !RefUnwindSafe for Connection<S>
impl<S> Send for Connection<S>where
S: Send,
impl<S> Sync for Connection<S>where
S: Sync,
impl<S> Unpin for Connection<S>where
S: Unpin,
impl<S> UnsafeUnpin for Connection<S>where
S: UnsafeUnpin,
impl<S = MaybeTlsStream<TcpStream>> !UnwindSafe for Connection<S>
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