bitpay / bitcore-p2p

Interface to the bitcoin P2P network for bitcore
MIT License
81 stars 275 forks source link

Support FirefoxOS & ChromeOS TCP Sockets #36

Open braydonf opened 9 years ago

braydonf commented 9 years ago

Add integrated support for TCP sockets available in FirefoxOS and ChromeOS:

Currently possible using "webpack" and "chrome-net" as demonstrated by @throughnothing: https://github.com/bitpay/bitcore-p2p/issues/21#issuecomment-74369533

throughnothing commented 9 years ago

To be clear, my demonstration won't work on a web page in Chrome, as the sockets API (that I'm using at least) is only available to Chrome apps/extensions. To do it from a normal webpage in the browser, I presume we'd have to use WebRTC or WebSockets, or something similar. WebTorrent may be something worth looking at, as it is a peer-to-peer bit-torrent client that can run in the browser using WebRTC for p2p communication.

braydonf commented 9 years ago

Yep, the TCP sockets available in apps and extensions can directly connect to any Bitcoin node, and hybrid nodes are not needed as in the case of WebSocket/WebRTC.