Javascript – Will Websockets allow a server to run in the browser

htmljavascriptwebsocket

Are there any plans for a Websockets listen function?

Allowing peer to peer applications in the browser could be revolutionary.

I found this answer: Will HTML5 allow web apps to make peer-to-peer HTTP connections? but it is rather old. I think the specification it refers to (the Connection api) has now been replaced with Websockets, which does not mention any listen facility.

Best Answer

The WebSockets API does not provide a way to listen for connections; it is client only.

You might be interested in Opera Unite.

Update:

Also check out pusherapp. It's a WebSockets service online. They charge for over 5 clients, but it's super simple to setup and use. Depending on what your p2p application requirements are, it might suffice.