本文整理汇总了Java中io.netty.handler.codec.http2.Http2Flags类的典型用法代码示例。如果您正苦于以下问题:Java Http2Flags类的具体用法?Java Http2Flags怎么用?Java Http2Flags使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Http2Flags类属于io.netty.handler.codec.http2包,在下文中一共展示了Http2Flags类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: channelRead
import io.netty.handler.codec.http2.Http2Flags; //导入依赖的package包/类
@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;
}
示例2: onUnknownFrame
import io.netty.handler.codec.http2.Http2Flags; //导入依赖的package包/类
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId,
Http2Flags flags, ByteBuf payload) throws Http2Exception {}
示例3: onUnknownFrame
import io.netty.handler.codec.http2.Http2Flags; //导入依赖的package包/类
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId,
Http2Flags flags, ByteBuf payload) {
}
示例4: onUnknownFrame
import io.netty.handler.codec.http2.Http2Flags; //导入依赖的package包/类
@Override
public void onUnknownFrame(ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags,
ByteBuf payload) {}
示例5: onUnknownFrame
import io.netty.handler.codec.http2.Http2Flags; //导入依赖的package包/类
@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
}