Closed jensenhertz closed 2 years ago
Hi @jensenhertz, the data channel of webrtc has a limited payload defined by the browser. You will need to use a split chunk solution to avoid this limitation.
Hey @tinchoz49, I thought it might be something like that. It's going to be curious exercise to get hypercore replication to work with this.
Remember that hypercore also has a limitation of 8 mb by block.
What we did in https://sher.app is to persist hypercore blocks of 10 kb (maximum) by doing this we avoid the webrtc limitation since the hypercore.stream sends chunks of 10 kb
We also have a splitter module that split the packets before to send to webrtc and it does a resemble from the other side (peer)
I should publish that module :S I will try to do it next week
@tinchoz49 I was just thinking that I need to write some sort of splitter, so if you have that already and you're willing to publish it, that would be perfect! 🙏
Thank you, that worked!
I noticed a curious behavior. If you write much more than ~204800 bytes, the connection dies instantly. Is this expected behavior?
I don't have much in-depth experience with WebRTC, so excuse me if this is well-known thing or something ;)
Here's my test code...