Raw WebSocket Handler Proxy

Raw WebSocket Handler Proxy

Demonstrates raw WebSocket handling using a proxy endpoint pattern for routing connections to actors.

Features

  • Raw WebSocket handlers: Use onWebSocket for 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:

Resources

Read more about WebSockets, state, and events.