This commit is contained in:
Screeny 2013-11-30 18:28:18 +01:00
parent 4a50d9e397
commit c5303a3d7a

View File

@ -37,7 +37,7 @@ function onAuthorizeSuccess(data, accept){
} }
function onAuthorizeFail(data, message, error, accept){ function onAuthorizeFail(data, message, error, accept){
if(critical) if(error)
throw new Error(message); throw new Error(message);
console.log('failed connection to socket.io:', message); console.log('failed connection to socket.io:', message);
@ -117,7 +117,7 @@ This function gives you the ability to filter all connected sockets via a user p
passportSocketIo.filterSocketsByUser(io, function(user){ passportSocketIo.filterSocketsByUser(io, function(user){
return user.gender === 'female'; return user.gender === 'female';
}).forEach(function(socket){ }).forEach(function(socket){
socket.send('msg', 'hello, woman!'); socket.emit('messsage', 'hello, woman!');
}); });
``` ```