Examples of newHandshakeResponse()


Examples of org.jboss.aerogear.io.netty.handler.codec.sockjs.transport.WebSocketHAProxyHandshaker.newHandshakeResponse()

    @Test
    public void haProxyUpgradeRequest() throws Exception {
        final WebSocketHAProxyHandshaker handshaker =  new WebSocketHAProxyHandshaker("ws://localhost/websocket",
                null,
                65536);
        final FullHttpResponse response = handshaker.newHandshakeResponse(wsUpgradeRequest(), null);
        assertThat(response.getStatus(), is(HttpResponseStatus.SWITCHING_PROTOCOLS));
        assertThat(response.headers().get(CONNECTION), equalTo("Upgrade"));
        assertThat(response.headers().get(UPGRADE), equalTo("WebSocket"));
        assertThat(response.headers().get(SEC_WEBSOCKET_LOCATION), equalTo("ws://localhost/websocket"));
        assertThat(response.headers().get(SEC_WEBSOCKET_ORIGIN), equalTo("http://example.com"));
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.