pub struct StreamSession { /* private fields */ }Expand description
Established WebTransport session used by the streaming loop.
Implementations§
Source§impl StreamSession
impl StreamSession
Sourcepub fn remote_address(&self) -> SocketAddr
pub fn remote_address(&self) -> SocketAddr
Current peer address.
Sourcepub fn max_datagram_size(&self) -> Option<usize>
pub fn max_datagram_size(&self) -> Option<usize>
Maximum datagram payload permitted by the current path MTU estimate.
Sourcepub fn send_frame_packet(
&self,
packet: &FramePacket,
) -> Result<(), TransportError>
pub fn send_frame_packet( &self, packet: &FramePacket, ) -> Result<(), TransportError>
Send a single packetized frame fragment over QUIC datagram transport.
Sourcepub fn send_frame_packets(
&self,
packets: &[FramePacket],
) -> Result<(), TransportError>
pub fn send_frame_packets( &self, packets: &[FramePacket], ) -> Result<(), TransportError>
Send a batch of packetized frame fragments in order.
Sourcepub async fn recv_input_datagram(&self) -> Result<InputEvent, TransportError>
pub async fn recv_input_datagram(&self) -> Result<InputEvent, TransportError>
Receive the next unreliable input datagram from 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 message from a uni- or bidirectional stream.
Sourcepub async fn recv_input(&self) -> Result<ReceivedInput, TransportError>
pub async fn recv_input(&self) -> Result<ReceivedInput, TransportError>
Receive the next input event, regardless of reliability mode.
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 control message to the browser using a unidirectional stream.
Trait Implementations§
Source§impl Clone for StreamSession
impl Clone for StreamSession
Source§fn clone(&self) -> StreamSession
fn clone(&self) -> StreamSession
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 StreamSession
impl !RefUnwindSafe for StreamSession
impl Send for StreamSession
impl Sync for StreamSession
impl Unpin for StreamSession
impl UnsafeUnpin for StreamSession
impl !UnwindSafe for StreamSession
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