How can I communicate over TCP sockets from JavaScript?

后端 未结 4 638
小鲜肉
小鲜肉 2020-12-01 03:58

I\'m thinking about how limiting it is for AJAX apps to have to poll for updates, when what would be ideal is for javascript to be able to set up a real two way connection t

4条回答
  •  余生分开走
    2020-12-01 04:29

    You can use node.js framework's socket.io package which can can be installed via npm (A node package manager).

    More detailed usage.

提交回复
热议问题