Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a browser-based Websocket listener implementation?

I am interested to know if anyone has built a javascript websocket listener for a browser. Basically the server side of a websocket that runs in a client. This would allow messages to be sent to the client directly. Why? Because instead of having a Node.js, python, java, etc, server process sitting on or near the client/browser, I can just use a thread in the browser as a listening server thread. I don't think that any browsers support this currently.

I've run across answers like this: https://news.ycombinator.com/item?id=2316132

Just curious if anyone has done this. I believe that the current Websockets spec does not support listeners on the browser. It would make the deployment of various peer-to-peer applications a bit easier to deploy.

like image 407
jmsimpson68 Avatar asked Feb 21 '26 20:02

jmsimpson68


1 Answers

WebRTC allows for peer-to-peer connections to be made between browsers.

You would still need a server in order for individual users to discover each other but then they could connect directly to each other rather than having to pass all their traffic via a central server.

like image 123
kicken Avatar answered Feb 24 '26 09:02

kicken



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!