0
socket.on("send_message", async (data) => {
  console.log("send_message", data);
  io.emit("send_message_receiver", data);
});

what does this function do?

Does emit() send a message to all the connected clients or only to the specific client?

VLAZ
  • 26,331
  • 9
  • 49
  • 67
  • 1
    https://socket.io/docs/v3/client-api/#socketemiteventname-args | https://socket.io/docs/v3/emitting-events/ | https://stackoverflow.com/questions/11498508/socket-emit-vs-socket-send – VLAZ Apr 10 '23 at 08:17

0 Answers0