code: private void verifyFrameOpcode(WebSocketFrame frame) throws WebSocketException
      {
          switch (frame.getOpcode())
          {
              case CONTINUATION:
              case TEXT:
              case BINARY:
              case CLOSE:
              case PING:
              case PONG:
                  // Known opcode
                  return;
  
              default:
                  break;
          }
  
          // If extended use of web socket frames is allowed.
          if (mWebSocket.isExtended())
          {
              // Allow the unknown opcode.
              return;
          }
  
          // A frame has an unknown opcode.
          throw new WebSocketException(
              WebSocketError.UNKNOWN_OPCODE,
              "A frame has an unknown opcode: 0x" + Integer.toHexString(frame.getOpcode()));
      }
docs: Ensure that the opcode of the give frame is a known one.
  
  <blockquote>
  <p>From RFC 6455, 5.2. Base Framing Protocol</p>
  <p><i>
  If an unknown opcode is received, the receiving endpoint MUST
  Fail the WebSocket Connection.
  </i></p>
  </blockquote>