Merge branch 'master' into Share-players-position-using-Socket.IO
# Conflicts: # back/src/Controller/IoSocketController.ts
This commit is contained in:
commit
5bfedb04fd
9 changed files with 732 additions and 16 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue