Package com.music.web.websocket

Examples of com.music.web.websocket.GameHandler.afterConnectionEstablished()


        playerJoinMsg.setGameId(game.getId());

        getSession("1");
        WebSocketSession player2Session = getSession("2");

        handler.afterConnectionEstablished(player2Session);

        handler.handleMessage(player2Session, getTextMessage(playerJoinMsg));

        GameEvent playerJoinedEvent = mapper.readValue(messages.get("1").removeLast().getPayload().toString(), GameEvent.class);
        Assert.assertEquals(GameEventType.PLAYER_JOINED, playerJoinedEvent.getType());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.