socket.emit() vs. socket.send()

后端 未结 6 1938
日久生厌
日久生厌 2020-12-02 04:04

What\'s the difference between these two?

I noticed that if I changed from socket.emit to socket.send in a working program, the server fail

6条回答
  •  天涯浪人
    2020-12-02 05:05

    In basic two way communication systems, socket.emit has proved to be more convincing and easy to use (personal experience) and is a part of Socket.IO which is primarily built for such purposes

提交回复
热议问题