server.sockets

  • (Namespace)命名空间

namespace的默认别名(/)

  1. io.sockets.emit('hi',"everyone");
  2. // 等价于
  3. io.of('/').emit('hi',"everyone")