Features
- Native WebSocket support: Use standard WebSocket APIs for real-time communication
- Bidirectional messaging: Send and receive messages between client and actor
- Connection management: Track WebSocket connections with
onConnectandonDisconnecthooks - Event broadcasting: Push updates to all connected WebSocket clients
Implementation
This example demonstrates native WebSocket integration with Rivet Actors:
- Actor Definition (
src/backend/registry.ts): Shows how to use native WebSocket APIs with actors for real-time communication
Resources
Read more about WebSockets, events, and lifecycle hooks.



