GraftJS / jschan

JavaScript port of libchan based around streams
MIT License
157 stars 9 forks source link

webrtc transport #27

Open AdrianRossouw opened 9 years ago

AdrianRossouw commented 9 years ago

we discussed wanting to enable graft/jschan over webrtc data channels too. this issue is to collect some of the related concepts.

AdrianRossouw commented 9 years ago

Raynos has a data-channel module which seems to do some of what we need : https://github.com/Raynos/data-channel

Ampersand.js guys have a bunch of relevant modules/experience : https://www.npmjs.org/package/rtcpeerconnection https://www.npmjs.org/package/webrtc https://www.npmjs.org/package/simplewebrtc

AdrianRossouw commented 9 years ago

And there's all @feross' excellent work over on webtorrent : https://github.com/feross/webtorrent

The most relevant of those would seem to be simple-peer: https://github.com/feross/simple-peer

mcollina commented 9 years ago

It should be easy to wire Graft services through https://github.com/feross/simple-peer#stream--peergetdatastream and https://github.com/GraftJS/jschan/tree/master/lib/stream (it's what we use for websockets anyway).

feross commented 9 years ago

@mcollina yep, that should work! but let me know if you run into any issues and i'll do my best to help debug :)

mcollina commented 9 years ago

@feross thanks! :). Just one question: that stream is binary by default, right?

feross commented 9 years ago

yep!