lib/websocket/event_dispatcher.js
function sendToMultiple(send, msg, destinations, type) {
  destinations = destinations instanceof Array && destinations || [destinations];
  destinations.forEach(function(destination) {
    var set, socketIds;
    set = subscriptions[type];
    if ((socketIds = set.members(destination))) {
      return socketIds.slice(0).forEach(function(socketId) {
        if (!send.socketId(socketId, msg, destination)) {
          return set.removeFromAll(socketId);
        }
      });
    }
  });
  return true;
}
function sendToMultiple(send, msg, destinations, type) {
  destinations = destinations instanceof Array && destinations || [destinations];
  destinations.forEach(function(destination) {
    var set, socketIds;
    set = subscriptions[type];
    if ((socketIds = set.members(destination))) {
      return socketIds.slice(0).forEach(function(socketId) {
        if (!send.socketId(socketId, msg, destination)) {
          return set.removeFromAll(socketId);
        }
      });
    }
  });
  return true;
}
function sendToMultiple ( send , msg , destinations , type ) { destinations = destinations instanceof Array && destinations || [ destinations ] ; destinations . forEach ( function ( destination ) { var set , socketIds ; set = subscriptions [ type ] ; if ( ( socketIds = set . members ( destination ) ) ) { return socketIds . slice ( 0 ) . forEach ( function ( socketId ) { if ( ! send . socketId ( socketId , msg , destination ) ) { return set . removeFromAll ( socketId ) ; } } ) ; } } ) ; return true ; }
Private Attempt to send the event to the socket. If socket no longer exists, remove it from set
Private Attempt to send the event to the socket . If socket no longer exists remove it from set