Introduction to ProductFlo WebSocket implementation
/ws
- Primary WebSocket endpoint (no authentication required)/ws/secure
- Authenticated WebSocket endpoint requiring token/ws
- Socket.IO compatible endpoint (conditionally mounted at runtime)/ws/secure
endpoint which requires a token:
/ws
endpoint:
CodeType
enum:
MESSAGE_CODE_REQUIRED
: Missing message codeUNSUPPORTED_MESSAGE_TYPE
: Unknown message typeROOM_ID_REQUIRED
: Room ID not providedFAILED_TO_PROCESS_MESSAGE
: General processing errorutils/websocket_manager.py
): Central component for connection management, message routing, and broadcasting
models/websocket.py
): Pydantic models for typed message validation
api/routes/websocket.py
): FastAPI WebSocket endpoint definitions