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?
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?