Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
跟进这个答案。在给出的答案中,处理程序join没有参数。
join
room.on('join', function() { console.log("Someone joined the room."); });
那是对的吗?处理程序join没有参数?
join不是内置事件;这是一个自定义事件,稍后在示例中发出。它可以像 Socket.IO 中的任何其他事件一样接受参数。