编程语言
首页 > 编程语言> > [Node.js] Socket.io and WebSocket

[Node.js] Socket.io and WebSocket

作者:互联网

https://btholt.github.io/complete-intro-to-realtime/socketio

https://btholt.github.io/complete-intro-to-realtime/intro-to-websockets

 

Socket.io:

FE:

const socket = io("http://localhost:8080");

socket.on("connect", () => {
  console.log("connected");
  presence.innerText = "

标签:Node,WebSocket,Socket,text,user,io,msg,const,socket
来源: https://www.cnblogs.com/Answer1215/p/16482842.html