admin管理员组

文章数量:1401922

I want a simple socket connection, where the server should tell the client the total amount of connections (whenever a connection happens), and the client should update the DOM. I feel like socket.io or any other library is too full featured for such a simple reason. Any idea how to do this without libraries?

I want a simple socket connection, where the server should tell the client the total amount of connections (whenever a connection happens), and the client should update the DOM. I feel like socket.io or any other library is too full featured for such a simple reason. Any idea how to do this without libraries?

Share Improve this question asked Aug 21, 2016 at 17:05 Kabir ShahKabir Shah 3091 gold badge3 silver badges12 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

Node.js documentation shows a very good example how to municate using Sockets without libraries: https://nodejs/api/http.html#http_event_upgrade

Socket.io is not too 'full featured'. It's quite minimalistic and makes everything works with much less pain. I really remend you trying it.

本文标签: javascriptWhat is a simple way to use websockets in Nodejs WITHOUT a libraryStack Overflow