pub trait WebSocketSocket: Send + Sync {
// Required methods
fn send_binary<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WebSocketReceive, SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), SteamError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn is_open(&self) -> bool;
}Expand description
A WebSocket socket.
Required Methods§
Sourcefn send_binary<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_binary<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends a binary message.
Sourcefn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WebSocketReceive, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WebSocketReceive, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receives the next chunk of a message.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".