Socket.io的WebSocket基础



在本视频中,我们将学习如何使用Socket.io和Node.JS设置Web套接字在客户端和服务器之间进行通信。

我们将在DigitalOcean提供的实时VPS服务器上托管套接字,以便我们的项目可以从全球Internet上进行。

转到https://howcode.org了解更多!

链接到DigitalOcean:http://howco.de/d_ocean

链接到howCode Facebook:http://howco.de/fb
链接到howCode Twitter:http://howco.de/twitter
链接到/r/howCode:http://howco.de/reddit

别忘了订阅更多! 。

11 comments
  1. to "broadcast" with socket.io the usage of io.sockets.emit will just send a packet to all the clients, it's not really a broadcast. To send to all clients except the sender, use socket.broadcast.emit('message', "this is a test");

Comments are closed.