diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-24 12:12:15 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-24 16:45:38 +0200 |
| commit | f453cd39ef0fec606b3d1a67b3fae5fa96e719f9 (patch) | |
| tree | a64162ae8579ac275ad9b91822290920e150568f /docs | |
| parent | fedb0f2afa552747a45b6b7c362a7977923e67ff (diff) | |
| download | meshbay-f453cd39ef0fec606b3d1a67b3fae5fa96e719f9.tar.gz | |
refactor(node): move the session core out of webrtc_server
SessionCore in transport/webrtc/core.py, last among the bases: state,
the data channel, task ownership, the peer registry, sending and teardown.
The facade keeps _dispatch_message and WebRTCTransport.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/MESHBAY_NODE_PROTOCOL.md | 11 | ||||
| -rw-r--r-- | docs/transfers-v1.md | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/docs/MESHBAY_NODE_PROTOCOL.md b/docs/MESHBAY_NODE_PROTOCOL.md index 35366f0..a219b50 100644 --- a/docs/MESHBAY_NODE_PROTOCOL.md +++ b/docs/MESHBAY_NODE_PROTOCOL.md @@ -4,8 +4,8 @@ **Oldest peer accepted:** `3.0` — `handshake.py` (`MNP_MIN_SUPPORTED`) **Normative implementation:** `meshbay-common` (`protocol.py`, `handshake.py`, `groupbox.py`, `chatbox.py`, `adminop.py`, `join.py`, `device.py`, `crypto.py`, -`webcrypto.py`), `meshbay-node` (`transport/wire.py`, `transport/webrtc_server.py`, -`transport/quic_server.py`, `transfers.py`, `uploads.py`), browser client +`webcrypto.py`), `meshbay-node` (`transport/wire.py`, `transport/webrtc_server.py` +and `transport/webrtc/`, `transport/quic_server.py`, `transfers.py`, `uploads.py`), browser client (`meshbay-hub/static/transport.js`, `static/crypto.js`). **Document status:** descriptive specification of the protocol as implemented on 2026-09-10. It describes the protocol as it stands. Where the code and this document @@ -2291,7 +2291,7 @@ LP(x) = uint32be(len(x)) || x every field, no exceptions | Device attempts | 5 per connection | ” | | `MAX_DEVICES_PER_USER` | 5 | `roster.py` | | `MAX_LINK_INVITES_PER_GROUP` | 20 unredeemed invitation links | `roster.py` | -| `PRE_HANDSHAKE_MAX_MSG` / `MAX_MSG` | 64 KiB / 64 MiB | `webrtc_server.py` / `webrtc/limits.py` | +| `PRE_HANDSHAKE_MAX_MSG` / `MAX_MSG` | 64 KiB / 64 MiB | `webrtc/core.py` / `webrtc/limits.py` | | `CHUNK_SIZE` | 1 MiB | `webrtc/limits.py` | | `DOWNLOAD_BUFFER_HIGH` | 2 MiB | `webrtc/files.py` | | `MAX_UPLOAD_BYTES` | 8 GiB, default only — `max_upload_gb` overrides it per node | `webrtc/upload_handlers.py` | @@ -2301,7 +2301,7 @@ LP(x) = uint32be(len(x)) || x every field, no exceptions | `UPLOAD_PROBE_INDEX` / probe timeout | `-1` / 5 s | `protocol.py`, `transport.js` | | `PART_SUFFIX` / `ORPHAN_AFTER_SECS` | `.part` / 24 h | `uploads.py` | | `DEFAULT_MAX_CONCURRENT` (node-wide, per kind) | 8 | `transfers.py` | -| `DEFAULT_MAX_PER_MEMBER` (per group, per kind) | 2, settable 1–32 | `transfers.py`, `webrtc_server.py` | +| `DEFAULT_MAX_PER_MEMBER` (per group, per kind) | 2, settable 1–32 | `transfers.py`, `webrtc/node_ops.py` | | `GRANT_DEADLINE_SECS` / `IDLE_TIMEOUT_SECS` | 30 s / 120 s | `transfers.py` | | `MAX_QUEUED_PER_MEMBER` / `MAX_MISSED_GRANTS` | 32 / 3 | ” | | `MAX_LEASELESS_IN_FLIGHT` / `LEASELESS_IDLE_SECS` | 12 files / 60 s | ” | @@ -2340,7 +2340,8 @@ meshbay-common/ protocol.py message types, chunk and upload codecs crypto.py GEK, chunk keys, ECIES wrap, BLAKE3 ids webcrypto.py the AES variants the browser can also compute -meshbay-node/ transport/webrtc_server.py the reference implementation of MNP +meshbay-node/ transport/webrtc_server.py the reference implementation of MNP, + transport/webrtc/ assembled from these modules transport/quic_server.py the QUIC transport, in development (§5.2) transport/wire.py the one index encoder transfers.py leases, queues, caps, leaseless reads diff --git a/docs/transfers-v1.md b/docs/transfers-v1.md index f1002a9..47e82a6 100644 --- a/docs/transfers-v1.md +++ b/docs/transfers-v1.md @@ -181,7 +181,7 @@ node-wide slot they would then hold while a second member has none. Reversed, one member arriving first takes all eight. **"Per member" means per account, summed across their devices**, resolved with -`_sessions_of(user_id)` (`webrtc_server.py:3325`) — which exists for exactly +`_sessions_of(user_id)` (`webrtc/core.py`) — which exists for exactly this reason, since device linking landed. Two browsers and a desktop client signed in as the same person share the two slots. Anything else makes the cap a function of how many tabs someone opens. |