Package se.cgbystrom.netty.http.websocket

Examples of se.cgbystrom.netty.http.websocket.WebSocketClient.connect()


        WebSocketClientFactory clientFactory = new WebSocketClientFactory();
        final TestClient callback = new TestClient();

        WebSocketClient client = clientFactory.newClient(new URI("ws://localhost:" + port + "/websocket"), callback);

        client.connect().awaitUninterruptibly();
        Thread.sleep(1000);

        assertTrue(callback.connected);
        assertEquals(TestClient.TEST_MESSAGE.toUpperCase(), callback.messageReceived);
        client.disconnect();
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.