Hacker News new | past | comments | ask | show | jobs | submit login

You can do offline signaling. Quoting MDN:

> It's any sort of channel of communication to exchange information before setting up a connection, whether by email, postcard, or a carrier pigeon. It's up to you.

All you need are SDPs and ICE Candidates. People choose a centralized signaling server because it's the easiest but WebRTC does not dictate it be that way.

Echoing the other commenter, there really is no other way to establish a connection without some knowledge of the other peer, be it gained online or offline.




I experimented with implementing this manual signaling where the delay between back and forth could be dozens of seconds or even minutes.

I found that you need to call restartIce, which is not typically called in SimplePeer and is not normally exposed.

So as it currently stands, SimplePeer regular version that you can get from the package manager will not support signaling over dozens of minutes. It just won't work.

But it can be made to work if you just call restart ICE, which keeps everything alive.

I discovered this through my own research and experiments.

And you can see the code below. And also, you can fork this repo and read the instructions to get a working version as well.

I think the original idea was basically you can, like, be in your shell and you can run this repo and then you can be chatting with people who come to your GitHub repository. And, the signaling is done over comments and there’s sort of like a comment robot that facilitates that to make it easy.

https://github.com/o0101/janus/

RestartIce: https://github.com/o0101/janus/blob/9b092218b7623ca198c3caef...


Exactly. This is trivial to carry out and can be done "by hand" between two browsers. I don't know what the OP is talking about. They are speaking as if the commonly chosen mode of bootstrapping a connection is fundamental to the entire communication cycle. It's flat out not true. When the connection has been established, peers are connected directly, but by their definition, this doesn't matter because a trusted peer was used to form the initial connection. Ridiculous. By that logic, it wouldn't be a P2P connection if IPs were initially exchanged by snail mail or carrier pigeon, or if DNS were used.


And once you do connect with a peer, peers can maintain DHTs of other peers and you can have a true mesh network where you signal over WebRTC itself.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: