Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does HTML5 Support Peer-to-Peer (and not just WebSockets)

The language I am working in is Javascript on HTML5-compatible browsers.

My understanding is that WebSockets require a socket server to transport push notifications and messages back and forth between clients.

Is there an actual peer-to-peer capability with HTML5 that does not require a socket server? Has anyone seen example client-side code in Javascript that exemplifies this capability?

like image 470
eeejay Avatar asked Nov 15 '10 05:11

eeejay


People also ask

Which html5 features enables peer-to-peer file sharing?

Web RTC introduced by World Wide Web Consortium (W3C). That supports browser-tobrowser applications for voice calling, video chat, and P2P file sharing.

Is WebSockets peer-to-peer?

The idea for WebSockets was born out of the limitations of HTTP-based technology. It is a peer-to-peer protocol - data that is sent from the server to the client must first be requested. In turn, WebSockets allow you to send data based on UDP-like WebSockets messages, but with higher TCP reliability.

Can HTTP be used in peer-to-peer applications?

As HTTP is one of the most widely used protocols, creating a generic P2P HTTP architecture could enable a vast amount of existing services to benefit from the advantages of P2P networking. However, current initiatives focus only on specific HTTP- based applications, replacing certain functionality with a P2P overlay.

What is the difference between WebSocket and WebRTC?

WebSocket provides a client-server computer communication protocol, whereas WebRTC offers a peer-to-peer protocol and communication capabilities for browsers and mobile apps. While WebSocket works only over TCP, WebRTC is primarily used over UDP (although it can work over TCP as well).


2 Answers

See the answers for Will HTML5 allow web apps to make peer-to-peer HTTP connections? However, the content in the WebSockets specification seems to have gone, so I suspect the answer now is "no".

like image 87
Chris Morgan Avatar answered Nov 15 '22 18:11

Chris Morgan


WebRTC http://www.webrtc.org/ https://developer.mozilla.org/en-US/docs/Web/Guide/API/WebRTC

But in 2010 it wasn’t a thing :(

like image 39
stevemao Avatar answered Nov 15 '22 18:11

stevemao