
P2p file transfer between browsers using webrtc
Published: 7/10/2026
PS: As it was my first time using WebRTC, I have used Cursor extensively for boilerplate and tried to hand-code the core logic.
So, just after starting to learn about creating web apps, one topic that kept coming up was WebSockets and WebRTC. Now, when it comes to WebSockets, the most common things that come to our mind when we hear this are chat rooms, games, video calls, file transfer, etc. I used to always think of implementing one, but then I used to be lazy and couldn't get beyond “ws.on" and “onmessage” stuff.
But recently, I saw an app that allowed P2P file transfer between browsers without any intermediate server (except for signalling), and as I got a Cursor subscription recently, I thought, why not try to implement it myself so I can learn about WebRTC? So there it goes. Cursor helped me scaffold and write the boilerplate template, which is often boring, and then the energy for the core logic just vanishes. So, let’s explore the core concepts used. .