Package io.undertow.websockets.core

Examples of io.undertow.websockets.core.UTF8Output


            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.close(new CloseReason(code, reasonPhrase));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
View Full Code Here


            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.close(new CloseReason(code, reasonPhrase));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
View Full Code Here

            @Override
            public void run() {
                try {
                    if (singleBuffer.remaining() > 2) {
                        final int code = singleBuffer.getShort();
                        session.close(new javax.websocket.CloseReason(javax.websocket.CloseReason.CloseCodes.getCloseCode(code), new UTF8Output(singleBuffer).extract()));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
                    invokeOnError(e);
View Full Code Here

            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.close(new CloseReason(code, reasonPhrase));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
View Full Code Here

            @Override
            public void run() {
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.closeInternal(new CloseReason(code, reasonPhrase));
                    } else {
                        session.closeInternal(new CloseReason(CloseReason.CloseCodes.NO_STATUS_CODE, null));
                    }
                } catch (IOException e) {
View Full Code Here

            @Override
            public void run() {
                try {
                    if (singleBuffer.remaining() > 2) {
                        final int code = singleBuffer.getShort();
                        session.close(new javax.websocket.CloseReason(javax.websocket.CloseReason.CloseCodes.getCloseCode(code), new UTF8Output(singleBuffer).extract()));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
                    invokeOnError(e);
View Full Code Here

            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 2) {
                        final int code = singleBuffer.getShort();
                        session.close(new javax.websocket.CloseReason(javax.websocket.CloseReason.CloseCodes.getCloseCode(code), new UTF8Output(singleBuffer).extract()));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
                    invokeOnError(e);
View Full Code Here

            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.close(new CloseReason(code, reasonPhrase));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
View Full Code Here

            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.close(new CloseReason(code, reasonPhrase));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
View Full Code Here

            public void run() {
                WebSockets.sendClose(toSend, channel, null);
                try {
                    if (singleBuffer.remaining() > 1) {
                        final CloseReason.CloseCode code = CloseReason.CloseCodes.getCloseCode(singleBuffer.getShort());
                        final String reasonPhrase = singleBuffer.remaining() > 1 ? new UTF8Output(singleBuffer).extract() : null;
                        session.close(new CloseReason(code, reasonPhrase));
                    } else {
                        session.close();
                    }
                } catch (IOException e) {
View Full Code Here

TOP

Related Classes of io.undertow.websockets.core.UTF8Output

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.