sih

socket.io-hotel

socket.io-hotel is a room's manager that adds new features and functionalities to socket.io

Showing:

Popularity

Downloads/wk

5

GitHub Stars

12

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

5.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

##socket.io-hotel

room's manager that adds new features and functionalities to socket.io


###how to install npm install socket.io-hotel

###how to use

io    = require('socket.io')(http),
Hotel = require('socket.io-hotel')
//...
var hotel = new Hotel(io.sockets.adapter)

###API

####setPropertyRoom(roomID, key, val, clbk)
sets a new property [val: key] to the room . clbk receives an object with the rooms' properties modified

####delRoomProperty(roomID, key, clbk)
deletes a specific property from the room. callback receives an object with the rooms' properties object modified

####getPropertiesRoom(roomID, clbk)
callback receives all properties from a give object

####listRooms = function(clbk)
calback receives a list with all rooms

####getUsersRoom = function(roomID, clbk)
callback receives all users from a given room

####delEmptyRoom = function(roomID, clbk)
if room is empty, delete it. callback returns true if the room was deleted and false otherwise

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial