Simple chat room application of websocket

First press packets:

Be sure to node-based development environment!
socket.emit () is to send a broadcast, only themselves visible
socket.broadcast.emit () is to send a broadcast, in addition to their invisible, other people are visible

Guess you like

Origin www.cnblogs.com/lyly96720/p/12526990.html