Expand description
Host-side WebSocket connections for Oxide guest modules.
Guests call the api_ws_* imports to open connections, send messages, poll
for incoming messages, query connection state, and close connections.
All I/O is non-blocking from the guest’s perspective: the host spins up a
tokio task per connection that drives the underlying tokio-tungstenite
stream, pushes received frames into a VecDeque, and forwards outgoing
frames from an mpsc channel.
Structs§
- WsState
- All WebSocket state for a tab. Lazily initialised on the first
api_ws_*call.
Constants§
- WS_
CLOSED - Connection is closed or could not be opened.
- WS_
CLOSING - Connection is in the process of closing.
- WS_
CONNECTING - Connection is being established.
- WS_OPEN
- Connection is open and ready to communicate.
Functions§
- register_
ws_ functions - Register all
api_ws_*host functions on the given linker.