feat: use ES6 Sets and Maps
The sids and the rooms objects are now Map<string, Set<string>>: sids => Map<SocketId, Set<Room>> rooms => Map<Room, Set<SocketId>> Breaking changes: the clients() and clientRooms() methods will now return a Set instead of an array. Also, the rooms argument in the broadcast() method will now be a Set too. Besides, the callbacks were removed from all function signatures, as every operation is synchronous. Regarding the Redis adapter, the clients() method is the only operation which will now return a promise. This change allows us to remove the Room class, which was used to have an external length attribute (instead of computing Object.keys() everytime).
D
Damien Arrachequesne committed
53ed3f4099c073546c66d911a95171adcefc524c
Parent: ae23c7e