Understand the Chuan Architecture and Data Flow
mainChuan is a WebRTC-based P2P file transfer application. The architecture is split into three distinct planes to ensure privacy and performance:
- Control Plane (HTTP): Uses REST APIs to create and query rooms.
- Signaling Plane (WebSocket): Uses WebSockets to exchange SDP (offer/answer) and ICE candidates between peers. The server acts as a pure relay and does not parse these messages.
- Data Plane (P2P): Actual files, text, and media streams are transferred directly between browsers via WebRTC
DataChannelandMediaStream, bypassing the server entirely.
Key Technical Specs:
- File Transfer: Uses WebRTC DataChannel with 256KB chunks, CRC32 checksums, and ACK confirmations.
- Text Messaging: Real-time bidirectional sync via DataChannel.
- Desktop Sharing: Uses
MediaStreamviagetDisplayMedia.