aboutsummaryrefslogtreecommitdiffstats
path: root/docs/transfers-v1.md
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-24 09:03:06 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-24 16:45:38 +0200
commitffdb70784f11de0df8162cea5e9f5abfac91ea96 (patch)
tree70d7577aaef5e4b5b493444bb8d1d81d8e416ce0 /docs/transfers-v1.md
parentfd620dc2b61b5ef6fe72581321f488ebf8faf746 (diff)
downloadmeshbay-ffdb70784f11de0df8162cea5e9f5abfac91ea96.tar.gz
refactor(node): move file browsing and folder/file ops out of webrtc_server
FilesMixin in transport/webrtc/files.py; the blocking disk helpers join _locate in webrtc/disk.py, and the lease states go to webrtc/limits.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs/transfers-v1.md')
-rw-r--r--docs/transfers-v1.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/transfers-v1.md b/docs/transfers-v1.md
index 13e4869..711c861 100644
--- a/docs/transfers-v1.md
+++ b/docs/transfers-v1.md
@@ -52,9 +52,9 @@ naturally make are false here.
**A download is invisible to the node.** `pipelinedDownload`
(`static/file-utils.js`) sends `PIPELINE_WINDOW = 8` independent `file_req`
messages and reassembles the answers. Each one is served by
-`_do_file_request` (`webrtc_server.py:3380`), which looks the entry up, reads
+`_do_file_request` (`webrtc/files.py`), which looks the entry up, reads
and encrypts one 1 MB chunk, waits for room on the channel
-(`DOWNLOAD_BUFFER_HIGH`, `webrtc_server.py:253`) and sends it. **The node never
+(`DOWNLOAD_BUFFER_HIGH`, `webrtc/files.py`) and sends it. **The node never
learns that a download started, and never learns that one ended.** There is
nothing to count and nothing to cap. This is the central fact of this work.
@@ -114,7 +114,7 @@ Worth stating, because each of these is a plausible first attempt.
**push** the grant.
5. **Gating every `file_req`.** Thumbnails, posters, cover art and audio
transcodes are served through the *same* `file_req` path
- (`_try_serve_thumbnail`, `webrtc_server.py:3353`), and so are image and text
+ (`_try_serve_thumbnail`, `webrtc/files.py`), and so are image and text
previews. Requiring a slot for all of them means opening a poster grid
queues behind a film. §4.4 handles this.
6. **Holding a slot while paused.** If pausing keeps the slot, one member can
@@ -236,7 +236,7 @@ function asked:
| What | Call site | Resolves to | Rule |
|---|---|---|---|
-| Thumbnails, TMDB posters, cover art, cached audio transcodes | `MediaThumb` (`video-app.js:204`), and the Music/Photos grids through it | a **media-cache id**, not an index entry — `_try_serve_thumbnail`, `webrtc_server.py:3353` | **Never leased, never counted, never queued.** One chunk each, out of a bounded cache the node built itself |
+| Thumbnails, TMDB posters, cover art, cached audio transcodes | `MediaThumb` (`video-app.js:204`), and the Music/Photos grids through it | a **media-cache id**, not an index entry — `_try_serve_thumbnail`, `webrtc/files.py` | **Never leased, never counted, never queued.** One chunk each, out of a bounded cache the node built itself |
| Looking at one file — a photo opened full size, a PDF, an image, a text file | `PhotoViewer` (`photos-app.js:171`), the Files preview modal (`files-app.js:610`) | a real index entry, fetched whole | **Not leased.** Bounded by §3.4.1 below, which no real viewer ever reaches |
| Downloading, and uploading | `downloadEntry`, `downloadDirectory` (`file-utils.js`), `uploadFile` (`transport.js:2192`) | a real index entry | **Leased.** These are exactly the three call sites that go through `transfers.start()` — the three that produce a row in the transfers widget |