Features
- Raw WebSocket handlers: Use
onWebSocketfor low-level WebSocket control and custom protocols - Proxy endpoint pattern: Route WebSocket connections through a proxy endpoint to actors
- Connection management: Track WebSocket connections with state and broadcasting
- Real-time chat: Message broadcasting with user presence and chat history
- Persistent state: Messages and user data automatically saved in actor state
Implementation
This example demonstrates routing WebSocket connections through a proxy:
- Actor Definition (
src/backend/registry.ts): Uses proxy endpoint pattern to route WebSocket connections to actors
Resources
Read more about WebSockets, state, and events.



