Merge branch 'master' into Share-players-position-using-Socket.IO

# Conflicts:
#	back/src/Controller/IoSocketController.ts
This commit is contained in:
gparant 2020-04-04 22:46:42 +02:00
commit 5bfedb04fd
9 changed files with 732 additions and 16 deletions

View file

@ -11,7 +11,7 @@ export class IoSocketController{
constructor(server : http.Server) {
this.Io = socketIO(server);
//authentication with token. it will be decodes and stock in socket.
// Authentication with token. it will be decoded and stored in the socket.
this.Io.use( (socket: Socket, next) => {
if (!socket.handshake.query || !socket.handshake.query.token) {
return next(new Error('Authentication error'));
@ -136,4 +136,4 @@ export class IoSocketController{
this.shareUsersPosition();
}, 10);
}
}
}