The WebRTC data channel uses a simple request/response protocol modeled on HTTP methods, enabling WebDAV-style operations over peer connections.
## Data Channel Protocol **Request:** ```json { "id": "...", "method": "GET|PUT|MKCOL|PROPFIND", "path": "/...", "body": ... } ``` **Response:** ```json { "id": "...", "status": 200, "body": ... } ```
## Signaling File Format **Offer (PUT /dispatchers/{userId}.json):** ```json { "identity": { "id": "abc123", "name": "Smith", "role": "airattack", "publicKey": {...} }, "offer": "v=0\r\no=- ...", "iceCandidates": [...], "timestamp": "2025-01-15T08:30:00Z" } ``` **Answer (at /{callerId}--{answererId}.json):** ```json { "identity": { ... }, "answer": "v=0\r\no=- ...", "iceCandidates": [...] } ```
## Room Structure ``` /rooms/{room}/ video/ # Who has video on audio/ # Who has audio on chat/ # Text messages breakout/ # Sub-rooms ```
## Signaling Bootstrap 1. HTTP WebDAV server is the "seed crystal" 2. First agent connects, becomes a signal server itself 3. Network grows organically - original server can go offline 4. Any agent can bootstrap new peers