Skip to content

Commit 0a28d8a

Browse files
feat(Mist): enhance native WebSocket server implementation
- Refactor error handling with structured `MistServerError` enum variants and improved error messages for better debuggability - Implement detailed logging throughout connection lifecycle (debug, trace levels) to enhance observability - Strengthen connection management using atomic IDs and thread-safe `ClientSenderChannelMap` with proper Mutex guards - Add comprehensive message processing for text/binary/ping/pong/close frames with JSON payload parsing - Introduce `send_message_to_client_by_id` public API with async MPSC channel integration for Mountain components - Emit Tauri events (`mist_client_connected`, `mist_client_disconnected`, `mist://message`) to decouple WebSocket logic from core systems - Expand documentation explaining architecture decisions and interaction patterns within Mountain's context - Improve TCP listener robustness with error recovery considerations and configurable address TODO markers These changes establish reliable bidirectional communication required for Sky frontend integration and future extension host RPC, aligning with Land's performance goals by reducing Node.js dependencies through native Rust WebSocket implementation.
1 parent 7c98d6b commit 0a28d8a

1 file changed

Lines changed: 550 additions & 246 deletions

File tree

0 commit comments

Comments
 (0)