Package io.undertow.websockets.api

Examples of io.undertow.websockets.api.WebSocketSessionHandler


    public static void main(final String[] args) {
        Undertow server = Undertow.builder()
                .addListener(8080, "localhost")
                .setHandler(path()
                        .addPath("/myapp", websocket(new WebSocketSessionHandler() {
                            @Override
                            public void onSession(final WebSocketSession session, WebSocketHttpExchange exchange) {
                                session.setFrameHandler(new AbstractAssembledFrameHandler() {
                                    @Override
                                    public void onTextFrame(final WebSocketSession session, final WebSocketFrameHeader header, final CharSequence payload) {
View Full Code Here


        System.out.println("To see chat in action is to open two different browsers and point them at http://localhost:8080");

        Undertow server = Undertow.builder()
                .addListener(8080, "localhost")
                .setHandler(path()
                        .addPath("/myapp", websocket(new WebSocketSessionHandler() {
                            @Override
                            public void onSession(final WebSocketSession session, WebSocketHttpExchange exchange) {
                                synchronized (sessions) {
                                    sessions.add(session);
                                }
View Full Code Here

public class WebSocketServer {

    public static void main(final String[] args) {
        Undertow server = Undertow.builder()
                .addListener(8080, "localhost")
                .addWebSocketHandler("/myapp", new WebSocketSessionHandler() {
                    @Override
                    public void onSession(final WebSocketSession session, WebSocketHttpExchange exchange) {
                        session.setFrameHandler(new AbstractAssembledFrameHandler() {
                            @Override
                            public void onTextFrame(final WebSocketSession session, final WebSocketFrameHeader header, final CharSequence payload) {
View Full Code Here

        System.out.println("To see chat in action is to open two different browsers and point them at http://localhost:8080");


        Undertow server = Undertow.builder()
                .addListener(8080, "localhost")
                .addWebSocketHandler("/myapp", new WebSocketSessionHandler() {
                    @Override
                    public void onSession(final WebSocketSession session, WebSocketHttpExchange exchange) {
                        synchronized (sessions) {
                            sessions.add(session);
                        }
View Full Code Here

TOP

Related Classes of io.undertow.websockets.api.WebSocketSessionHandler

Copyright © 2018 www.massapicom. 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.