Java 类io.netty.handler.codec.http2.Http2Flags 实例源码

项目:byproxy    文件:SettingFrameFixer.java   
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) {
    if (!(msg instanceof ByteBuf)) {
        ctx.fireChannelRead(msg);
        return;
    }

    ByteBuf in = (ByteBuf) msg;
    if (buf == null) {
        buf = in;
    } else {
        buf = cumulator.cumulate(ctx.alloc(), buf, in);
    }

    if (buf.readableBytes() < 5) {
        return;
    }

    byte frameType = buf.getByte(buf.readerIndex() + 3);
    byte flags = buf.getByte(buf.readerIndex() + 4);
    if (frameType == SETTINGS && (flags & Http2Flags.ACK) != 0) {
        // need to clear the Ack bit
        logger.debug("fix setting frame");
        flags = (byte) (flags & 0xfe);
        buf.setByte(buf.readerIndex() + 4, flags);
    }
    ctx.pipeline().remove(this);
    ctx.fireChannelRead(buf);
    buf = null;
}
项目:chromium-net-for-android    文件:Http2TestHandler.java   
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId,
        Http2Flags flags, ByteBuf payload) throws Http2Exception {}
项目:JavaAyo    文件:HelloWorldHttp2Handler.java   
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId,
                           Http2Flags flags, ByteBuf payload) {
}
项目:armeria    文件:Http2ResponseDecoder.java   
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags,
                           ByteBuf payload) {}
项目:carbon-transports    文件:HTTP2SourceHandler.java   
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId,
                           Http2Flags flags, ByteBuf payload) {
}
项目:xio    文件:Http2FrameForwarder.java   
@Override
public void onUnknownFrame(
    ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf payload) {
  // TODO(CK): We don't currently have a use case for these frames
}