Skip to content

Commit

Permalink
socket: added leaveAll
Browse files Browse the repository at this point in the history
  • Loading branch information
rauchg committed Dec 24, 2012
1 parent ef96e3b commit 2e71357
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ Socket.prototype.leave = function(room, fn){
return this;
};

/**
* Leave all rooms.
*
* @api private
*/

Socket.prototype.leaveAll = function(){
this.adapter.delAll(this.id);
};

/**
* Called by `Namespace` upon succesful
* middleware execution (ie: authorization).
Expand Down

0 comments on commit 2e71357

Please sign in to comment.