File transfer
A file moves directly from one browser to another over a data channel. No upload to a server, no download from it. The two peers connect, and the bytes flow between them.
What it enables
Private, direct file sharing in the browser. Because the file never touches a server, there is no storage cost, no size cap imposed by a backend, and no copy left behind. A multi-gigabyte transfer is limited only by the link between the two peers.
The connection is encrypted, so the file is protected in transit without any extra work.
How it works (high level)
A file is too large to send in one message. The sender splits it into chunks and writes them to the data channel in sequence. The receiver collects the chunks and reassembles the file when the last one arrives. Metadata, such as the file name and total size, goes first so the receiver knows what to expect.
The data channel runs in reliable, ordered mode for this case. Every chunk must arrive, and order matters, so the channel behaves like TCP and retransmits anything lost.
Speed is bounded by backpressure. The channel buffers outgoing data, and a sender that writes faster than the link can drain will grow that buffer without limit, risking memory pressure or a closed connection. The fix is to watch the buffered amount: keep sending while it stays below a threshold, pause when it rises, and resume when the buffer drains. This keeps the transfer fast without overwhelming the channel.
A progress indicator falls out naturally, since the sender knows the total size and how many bytes it has written.
Where it's used
Direct device-to-device sharing, drop tools that send a file from one tab to another, sending attachments alongside a chat, and transfers too large or too private to route through a server.