📅  最后修改于: 2022-03-11 15:00:40.183000             🧑  作者: Mango
io.on('connection', socket => {
socket.on('private message', (anotherSocketId, msg) => {
socket.to(anotherSocketId).emit('private message', socket.id, msg);
});
});