Package org.glassfish.grizzly.websockets

Examples of org.glassfish.grizzly.websockets.SimpleWebSocket.onConnect()


                final GrizzlyWebSocketAdapter webSocketAdapter = createWebSocketAdapter(context);
                context.setWebSocket(webSocketAdapter);
                SimpleWebSocket ws = webSocketAdapter.getGrizzlyWebSocket();
                if (context.getCurrentState() == UPGRADE) {
                    httpHeader.setChunked(false);
                    ws.onConnect();
                    WebSocketHolder.set(ctx.getConnection(), context.getProtocolHandler(), ws);
                    ((WebSocketUpgradeHandler) context.getHandler()).onSuccess(context.getWebSocket());
                    final int wsTimeout = context.getProvider().getClientConfig().getWebSocketTimeout();
                    IdleTimeoutFilter.setCustomTimeout(ctx.getConnection(), ((wsTimeout <= 0) ? IdleTimeoutFilter.FOREVER : wsTimeout),
                            TimeUnit.MILLISECONDS);
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.