pub struct WSClient {
pub session_id: SessionId,
pub peer_connection: Arc<Mutex<Arc<RTCPeerConnection>>>,
pub ice_servers: Vec<RTCIceServer>,
pub handle: Client<Self>,
pub data_channel_handler: Arc<Box<dyn DataChannelHandler>>,
}Fields§
§session_id: SessionId§peer_connection: Arc<Mutex<Arc<RTCPeerConnection>>>§ice_servers: Vec<RTCIceServer>§handle: Client<Self>§data_channel_handler: Arc<Box<dyn DataChannelHandler>>Trait Implementations§
Source§impl ClientExt for WSClient
impl ClientExt for WSClient
Source§fn on_text<'life0, 'async_trait>(
&'life0 mut self,
text: Utf8Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_text<'life0, 'async_trait>(
&'life0 mut self,
text: Utf8Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for text messages from the server. Read more
Source§fn on_binary<'life0, 'async_trait>(
&'life0 mut self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_binary<'life0, 'async_trait>(
&'life0 mut self,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for binary messages from the server. Read more
Source§fn on_connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when the client successfully connected (or reconnected). Read more
Source§fn on_call<'life0, 'async_trait>(
&'life0 mut self,
_call: Self::Call,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_call<'life0, 'async_trait>(
&'life0 mut self,
_call: Self::Call,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Handler for custom calls from other parts from your program. Read more
Source§fn on_connect_fail<'life0, 'async_trait>(
&'life0 mut self,
error: WSError,
) -> Pin<Box<dyn Future<Output = Result<ClientCloseMode, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_connect_fail<'life0, 'async_trait>(
&'life0 mut self,
error: WSError,
) -> Pin<Box<dyn Future<Output = Result<ClientCloseMode, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Called when the client fails a connection/reconnection attempt. Read more
Auto Trait Implementations§
impl Freeze for WSClient
impl !RefUnwindSafe for WSClient
impl Send for WSClient
impl Sync for WSClient
impl Unpin for WSClient
impl !UnwindSafe for WSClient
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