pub struct WebSocketSession { /* private fields */ }Expand description
Established WebSocket fallback session.
Implementations§
Source§impl WebSocketSession
impl WebSocketSession
Sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
Current peer address.
Sourcepub async fn send_frame_packet(
&self,
packet: &FramePacket,
) -> Result<(), TransportError>
pub async fn send_frame_packet( &self, packet: &FramePacket, ) -> Result<(), TransportError>
Send a single packetized frame fragment over WebSocket binary transport.
Sourcepub async fn send_frame_packets(
&self,
packets: &[FramePacket],
) -> Result<(), TransportError>
pub async fn send_frame_packets( &self, packets: &[FramePacket], ) -> Result<(), TransportError>
Send a batch of frame fragments in order.
Sourcepub async fn send_control_message(
&self,
payload: &[u8],
) -> Result<(), TransportError>
pub async fn send_control_message( &self, payload: &[u8], ) -> Result<(), TransportError>
Send a reliable UTF-8 control message to the browser.
Sourcepub async fn recv_reliable_input(&self) -> Result<InputEvent, TransportError>
pub async fn recv_reliable_input(&self) -> Result<InputEvent, TransportError>
Receive the next reliable input event from the browser.
Sourcepub async fn recv_input(&self) -> Result<ReceivedInput, TransportError>
pub async fn recv_input(&self) -> Result<ReceivedInput, TransportError>
Receive the next input event from the browser.
Trait Implementations§
Source§impl Clone for WebSocketSession
impl Clone for WebSocketSession
Source§fn clone(&self) -> WebSocketSession
fn clone(&self) -> WebSocketSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WebSocketSession
impl !RefUnwindSafe for WebSocketSession
impl Send for WebSocketSession
impl Sync for WebSocketSession
impl Unpin for WebSocketSession
impl UnsafeUnpin for WebSocketSession
impl !UnwindSafe for WebSocketSession
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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