2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-21 09:38:31 +02:00
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){
if(critical)
if(error)
throw new Error(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){
return user.gender === 'female';
}).forEach(function(socket){
socket.send('msg', 'hello, woman!');
socket.emit('messsage', 'hello, woman!');
});
```