Package cz.woitee.websockets

Examples of cz.woitee.websockets.WebSocketException


    WebSocketFrame readResult;
    do {
      readResult = WebSocketFrame.readFrame(in);
      if (readResult.bytesRead == -1) { return -1; }
      if (readResult.masked == false) {
        throw new WebSocketException("Received an unmasked frame from client.");
      }
      if (readResult.opcode == 0x8) {
        throw new WebSocketException("The opposite side closed the WebSocket connection.");
      }
      ping = readResult.opcode == 0x9;
      if (ping) {
        //automatically form ping response (pong)
        byte[] appData = readResult.bytes;
View Full Code Here

TOP

Related Classes of cz.woitee.websockets.WebSocketException

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.