Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

socket.io-hotel

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socket.io-hotel

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

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

##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)
//...
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

roomExists = function(roomID, clbk)
callback receives true if room exists. false otherwise

Keywords

FAQs

Package last updated on 26 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc