I have an emit where I'm trying to set the current state of the game, and then fire a few more emit after that. For some reason, none of the subsequent emits are working. I am new to Socket.IO so I'm not really sure what I'm doing wrong.
Here is the emit within my app.js:
socket.emit('set_game_state', 'Lobby', () => {
socket.emit('reconnect');
socket.emit('set_cookie', player);
socket.emit('player', player);
});
I've tried some console logs inside of the function as well and they don't print out.
Here is my angular front end:
this._gameService.socket.on('set_game_state', (newGameState: any) => {
this.currentGameState = newGameState;
});