bitcore-p2p icon indicating copy to clipboard operation
bitcore-p2p copied to clipboard

Support FirefoxOS & ChromeOS TCP Sockets

Open braydonf opened this issue 10 years ago • 2 comments

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

  • https://developer.mozilla.org/en-US/docs/Web/API/TCP_Socket_API
  • https://developer.chrome.com/apps/sockets_tcp

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

braydonf avatar Feb 16 '15 03:02 braydonf

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.

throughnothing avatar Feb 16 '15 04:02 throughnothing

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.

braydonf avatar Feb 16 '15 13:02 braydonf