gpt4 book ai didi

io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder类的使用及代码示例

转载 作者:知者 更新时间:2024-03-23 01:15:05 29 4
gpt4 key购买 nike

本文整理了Java中io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder类的一些代码示例,展示了WebSocket08FrameDecoder类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebSocket08FrameDecoder类的具体详情如下:
包路径:io.netty.handler.codec.http.websocketx.WebSocket08FrameDecoder
类名称:WebSocket08FrameDecoder

WebSocket08FrameDecoder介绍

[英]Decodes a web socket frame from wire protocol version 8 format. This code was forked from webbit and modified.
[中]从wire protocol version 8格式解码web套接字帧。这段代码是从webbit派生出来并修改的。

代码示例

代码示例来源:origin: wildfly/wildfly

@Override
protected WebSocketFrameDecoder newWebsocketDecoder() {
  return new WebSocket08FrameDecoder(false, allowExtensions, maxFramePayloadLength(), allowMaskMismatch);
}

代码示例来源:origin: wildfly/wildfly

in.skipBytes(actualReadableBytes());
return;
      protocolViolation(ctx, "RSV != 0 and no extension negotiated, RSV:" + frameRsv);
      return;
      protocolViolation(ctx, "received a frame that is not masked as expected");
      return;
        protocolViolation(ctx, "fragmented control frame");
        return;
        protocolViolation(ctx, "control frame with payload length > 125 octets");
        return;
        protocolViolation(ctx, "control frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received close control frame with payload len 1");
        return;
        protocolViolation(ctx, "data frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received continuation data frame outside fragmented message");
        return;
        protocolViolation(ctx,
            "received non-continuation data frame while inside fragmented message");

代码示例来源:origin: wildfly/wildfly

private void protocolViolation(ChannelHandlerContext ctx, String reason) {
  protocolViolation(ctx, new CorruptedFrameException(reason));
}

代码示例来源:origin: wildfly/wildfly

protocolViolation(ctx, "Invalid close frame body");
if (statusCode >= 0 && statusCode <= 999 || statusCode >= 1004 && statusCode <= 1006
    || statusCode >= 1012 && statusCode <= 2999) {
  protocolViolation(ctx, "Invalid close frame getStatus code: " + statusCode);
    new Utf8Validator().check(buffer);
  } catch (CorruptedFrameException ex) {
    protocolViolation(ctx, ex);

代码示例来源:origin: io.netty/netty-codec-http

in.skipBytes(actualReadableBytes());
return;
      protocolViolation(ctx, "RSV != 0 and no extension negotiated, RSV:" + frameRsv);
      return;
      protocolViolation(ctx, "received a frame that is not masked as expected");
      return;
        protocolViolation(ctx, "fragmented control frame");
        return;
        protocolViolation(ctx, "control frame with payload length > 125 octets");
        return;
        protocolViolation(ctx, "control frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received close control frame with payload len 1");
        return;
        protocolViolation(ctx, "data frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received continuation data frame outside fragmented message");
        return;
        protocolViolation(ctx,
            "received non-continuation data frame while inside fragmented message");

代码示例来源:origin: wildfly/wildfly

@Override
protected WebSocketFrameDecoder newWebsocketDecoder() {
  return new WebSocket08FrameDecoder(true, allowExtensions, maxFramePayloadLength(), allowMaskMismatch);
}

代码示例来源:origin: io.netty/netty-codec-http

private void protocolViolation(ChannelHandlerContext ctx, String reason) {
  protocolViolation(ctx, new CorruptedFrameException(reason));
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

in.skipBytes(actualReadableBytes());
return;
      protocolViolation(ctx, "RSV != 0 and no extension negotiated, RSV:" + frameRsv);
      return;
      protocolViolation(ctx, "received a frame that is not masked as expected");
      return;
        protocolViolation(ctx, "fragmented control frame");
        return;
        protocolViolation(ctx, "control frame with payload length > 125 octets");
        return;
        protocolViolation(ctx, "control frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received close control frame with payload len 1");
        return;
        protocolViolation(ctx, "data frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received continuation data frame outside fragmented message");
        return;
        protocolViolation(ctx,
            "received non-continuation data frame while inside fragmented message");

代码示例来源:origin: AsyncHttpClient/async-http-client

public void upgradePipelineForWebSockets(ChannelPipeline pipeline) {
 pipeline.addAfter(HTTP_CLIENT_CODEC, WS_ENCODER_HANDLER, new WebSocket08FrameEncoder(true));
 pipeline.addAfter(WS_ENCODER_HANDLER, WS_DECODER_HANDLER, new WebSocket08FrameDecoder(false, config.isEnableWebSocketCompression(), config.getWebSocketMaxFrameSize()));
 if (config.isAggregateWebSocketFrameFragments()) {
  pipeline.addAfter(WS_DECODER_HANDLER, WS_FRAME_AGGREGATOR, new WebSocketFrameAggregator(config.getWebSocketMaxBufferSize()));
 }
 pipeline.remove(HTTP_CLIENT_CODEC);
}

代码示例来源:origin: apache/activemq-artemis

private void protocolViolation(ChannelHandlerContext ctx, String reason) {
  protocolViolation(ctx, new CorruptedFrameException(reason));
}

代码示例来源:origin: apache/activemq-artemis

in.skipBytes(actualReadableBytes());
return;
      protocolViolation(ctx, "RSV != 0 and no extension negotiated, RSV:" + frameRsv);
      return;
      protocolViolation(ctx, "received a frame that is not masked as expected");
      return;
        protocolViolation(ctx, "fragmented control frame");
        return;
        protocolViolation(ctx, "control frame with payload length > 125 octets");
        return;
        protocolViolation(ctx, "control frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received close control frame with payload len 1");
        return;
        protocolViolation(ctx, "data frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received continuation data frame outside fragmented message");
        return;
        protocolViolation(ctx,
            "received non-continuation data frame while inside fragmented message");

代码示例来源:origin: io.netty/netty-codec-http

@Override
protected WebSocketFrameDecoder newWebsocketDecoder() {
  return new WebSocket08FrameDecoder(true, allowExtensions, maxFramePayloadLength(), allowMaskMismatch);
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

private void protocolViolation(ChannelHandlerContext ctx, String reason) {
  protocolViolation(ctx, new CorruptedFrameException(reason));
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

in.skipBytes(actualReadableBytes());
return;
      protocolViolation(ctx, "RSV != 0 and no extension negotiated, RSV:" + frameRsv);
      return;
      protocolViolation(ctx, "received a frame that is not masked as expected");
      return;
        protocolViolation(ctx, "fragmented control frame");
        return;
        protocolViolation(ctx, "control frame with payload length > 125 octets");
        return;
        protocolViolation(ctx, "control frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received close control frame with payload len 1");
        return;
        protocolViolation(ctx, "data frame using reserved opcode " + frameOpcode);
        return;
        protocolViolation(ctx, "received continuation data frame outside fragmented message");
        return;
        protocolViolation(ctx,
            "received non-continuation data frame while inside fragmented message");

代码示例来源:origin: io.netty/netty-codec-http

@Override
protected WebSocketFrameDecoder newWebsocketDecoder() {
  return new WebSocket08FrameDecoder(false, allowExtensions, maxFramePayloadLength(), allowMaskMismatch);
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

private void protocolViolation(ChannelHandlerContext ctx, String reason) {
  protocolViolation(ctx, new CorruptedFrameException(reason));
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

@Override
protected WebSocketFrameDecoder newWebsocketDecoder() {
  return new WebSocket08FrameDecoder(false, allowExtensions, maxFramePayloadLength(), allowMaskMismatch);
}

代码示例来源:origin: apache/activemq-artemis

protocolViolation(ctx, "Invalid close frame body");
if (statusCode >= 0 && statusCode <= 999 || statusCode >= 1004 && statusCode <= 1006
    || statusCode >= 1012 && statusCode <= 2999) {
  protocolViolation(ctx, "Invalid close frame getStatus code: " + statusCode);
    new Utf8Validator().check(buffer);
  } catch (CorruptedFrameException ex) {
    protocolViolation(ctx, ex);

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
protected WebSocketFrameDecoder newWebsocketDecoder() {
  return new WebSocket08FrameDecoder(false, allowExtensions, maxFramePayloadLength(), allowMaskMismatch);
}

代码示例来源:origin: io.netty/netty-codec-http

protocolViolation(ctx, "Invalid close frame body");
if (statusCode >= 0 && statusCode <= 999 || statusCode >= 1004 && statusCode <= 1006
    || statusCode >= 1015 && statusCode <= 2999) {
  protocolViolation(ctx, "Invalid close frame getStatus code: " + statusCode);
    new Utf8Validator().check(buffer);
  } catch (CorruptedFrameException ex) {
    protocolViolation(ctx, ex);

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com