Examples of asFrame()


Examples of org.eclipse.jetty.websocket.common.CloseInfo.asFrame()

                // First occurrence of .onCloseLocal or .onCloseRemote use
                if (ioState.wasRemoteCloseInitiated())
                {
                    CloseInfo close = ioState.getCloseInfo();
                    // reply to close handshake from remote
                    outgoingFrame(close.asFrame(),new OnCloseLocalCallback(new OnDisconnectCallback(true),close),BatchMode.OFF);
                }
            default:
                break;
        }
    }
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.CloseInfo.asFrame()

        serverConn.write(new TextFrame().setPayload("Hello"));
        serverConn.write(new TextFrame().setPayload("World"));

        // server sends close frame (code 1000, no reason)
        CloseInfo sclose = new CloseInfo(StatusCode.NORMAL,"From Server");
        serverConn.write(sclose.asFrame());

        // client receives 2 messages
        clientSocket.messageQueue.awaitEventCount(2,1,TimeUnit.SECONDS);

        // Verify received messages
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.CloseInfo.asFrame()

            case CLOSED:
                if (ioState.wasAbnormalClose())
                {
                    // Fire out a close frame, indicating abnormal shutdown, then disconnect
                    CloseInfo abnormal = new CloseInfo(StatusCode.SHUTDOWN,"Abnormal Close - " + ioState.getCloseInfo().getReason());
                    outgoingFrame(abnormal.asFrame(),new OnDisconnectCallback(), BatchMode.OFF);
                }
                else
                {
                    // Just disconnect
                    this.disconnect();
View Full Code Here

Examples of org.eclipse.jetty.websocket.common.CloseInfo.asFrame()

                }
                break;
            case CLOSING:
                CloseInfo close = ioState.getCloseInfo();
                // append close frame
                outgoingFrame(close.asFrame(),new OnDisconnectCallback(), BatchMode.OFF);
            default:
                break;
        }
    }
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.