async def incomming_handler(self, websocket, path):
    try:
        async for message in websocket:
            data = json.loads(message)
            if (data['cmd'] == 'join'):
                map_info = self.game.info()
                (await websocket.send(map_info))
                if (path == '/player'):
                    logger.info('<%s> has joined', data['name'])
                    (await self.players.put(Player(data['name'], websocket)))
                if (path == '/viewer'):
                    self.viewers.add(websocket)
            if ((data['cmd'] == 'key') and (self.current_player.ws == websocket)):
                logger.debug((self.current_player.name, data))
                self.game.keypress(data['key'][0])
    except websockets.exceptions.ConnectionClosed as c:
        logger.info('Client disconnected')
        if (websocket in self.viewers):
            self.viewers.remove(websocket)
async def incomming_handler(self, websocket, path):
    try:
        async for message in websocket:
            data = json.loads(message)
            if (data['cmd'] == 'join'):
                map_info = self.game.info()
                (await websocket.send(map_info))
                if (path == '/player'):
                    logger.info('<%s> has joined', data['name'])
                    (await self.players.put(Player(data['name'], websocket)))
                if (path == '/viewer'):
                    self.viewers.add(websocket)
            if ((data['cmd'] == 'key') and (self.current_player.ws == websocket)):
                logger.debug((self.current_player.name, data))
                self.game.keypress(data['key'][0])
    except websockets.exceptions.ConnectionClosed as c:
        logger.info('Client disconnected')
        if (websocket in self.viewers):
            self.viewers.remove(websocket)