我在客户端上有下一个代码:
Socket.notif.to(eventNameListen[i]).emit('public', { channel: eventNameListen[i] });
服务器端必须有什么代码才能将当前用户添加到房间eventNameListen[i]
?
我试过了:
socket.on('public', function (data) {
// ???
});
我在客户端上有下一个代码:
Socket.notif.to(eventNameListen[i]).emit('public', { channel: eventNameListen[i] });
服务器端必须有什么代码才能将当前用户添加到房间eventNameListen[i]
?
我试过了:
socket.on('public', function (data) {
// ???
});