use_ws_context

Function use_ws_context 

Source
pub fn use_ws_context(cx: &ScopeState) -> Rc<DioxusWs>
Expand description

Consumes WebSocket context. Useful for sending messages over the WebSocket connection.

NOTE: Currently the server is expected to send a message when the connection opens. You will not be able to send websocket messages from the client before a message has been received from the server. This is a limitation in the current reconnection logic.