Package org.atmosphere.wasync

Examples of org.atmosphere.wasync.Socket.status()


        latch.await(5, TimeUnit.SECONDS);
        socket.close();
        server.stop();

        assertEquals(socket.status(), Socket.STATUS.CLOSE);
    }

    @Test
    public void closeWithoutOpenTest() throws Exception {
        Config config = new Config.Builder()
View Full Code Here


        server.start();

        Client client = ClientFactory.getDefault().newClient();
        Socket socket = client.create();
        socket.close();
        assertEquals(socket.status(), Socket.STATUS.CLOSE);
    }

    @Test
    public void basicWebSocketTest() throws Exception {
        final CountDownLatch l = new CountDownLatch(1);
View Full Code Here

        latch.await(5, TimeUnit.SECONDS);

        server.stop();
        socket.close();

        assertEquals(socket.status(), Socket.STATUS.CLOSE);//or ERROR?
    }

    @Test
    public void timeoutTest() throws IOException, InterruptedException {
        logger.info("\n\ntimeoutTest\n\n");
View Full Code Here

        }).open(request.build());

        latch.await();


        logger.error("SOCKET STATUS [{}]", socket.status());

        assertEquals(response.get(), "HELLO");
        assertEquals(socket.status(), Socket.STATUS.OPEN);

        socket.close();
View Full Code Here


        logger.error("SOCKET STATUS [{}]", socket.status());

        assertEquals(response.get(), "HELLO");
        assertEquals(socket.status(), Socket.STATUS.OPEN);

        socket.close();

        assertEquals(socket.status(), Socket.STATUS.CLOSE);
    }
View Full Code Here

        assertEquals(response.get(), "HELLO");
        assertEquals(socket.status(), Socket.STATUS.OPEN);

        socket.close();

        assertEquals(socket.status(), Socket.STATUS.CLOSE);
    }

    @Test
    public void customHeaderTest() throws Exception {
        final CountDownLatch l = new CountDownLatch(1);
View Full Code Here

        latch.await(10, TimeUnit.SECONDS);
        socket.close();
        server.stop();

        assertEquals(socket.status(), Socket.STATUS.CLOSE);
    }

    @Test(enabled = true)
    public void testOpenWithAtmosphereClientAndProtocol() throws Exception {
        final CountDownLatch l = new CountDownLatch(1);
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.