public class WebSocket08FrameDecoder extends ByteToMessageDecoder implements WebSocketFrameDecoder
ByteToMessageDecoder.CumulatorChannelHandler.SharableCOMPOSITE_CUMULATOR, MERGE_CUMULATOR| Constructor and Description |
|---|
WebSocket08FrameDecoder(boolean expectMaskedFrames, boolean allowExtensions, int maxFramePayloadLength)
构造函数
|
WebSocket08FrameDecoder(boolean expectMaskedFrames, boolean allowExtensions, int maxFramePayloadLength, boolean allowMaskMismatch)
构造函数
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCloseFrameBody(ChannelHandlerContext ctx, ByteBuf buffer) |
protected void |
decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out)
解码从一个 ByteBuf到另一个。
|
actualReadableBytes, callDecode, channelInactive, channelRead, channelReadComplete, decodeLast, discardSomeReadBytes, handlerRemoved, handlerRemoved0, internalBuffer, isSingleDecode, setCumulator, setDiscardAfterReads, setSingleDecode, userEventTriggeredchannelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtensureNotSharable, handlerAdded, isSharableclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchannelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredhandlerAdded, handlerRemovedpublic WebSocket08FrameDecoder(boolean expectMaskedFrames,
boolean allowExtensions,
int maxFramePayloadLength)
expectMaskedFrames - Web套接字服务器必须将其设置为真正处理的传入掩码有效内容。
客户端实现必须将其设置为false。
allowExtensions - 允许使用或不使用保留扩展位的标志
maxFramePayloadLength - 帧有效负载的最大长度。
将其设置为适合您的应用程序有助于检查拒绝服务攻击。
public WebSocket08FrameDecoder(boolean expectMaskedFrames,
boolean allowExtensions,
int maxFramePayloadLength,
boolean allowMaskMismatch)
expectMaskedFrames - Web套接字服务器必须将其设置为真正处理的传入掩码有效内容。
客户端实现必须将其设置为false。
allowExtensions - 允许使用或不使用保留扩展位的标志
maxFramePayloadLength - 帧有效负载的最大长度。
将其设置为适合您的应用程序有助于检查拒绝服务攻击。
allowMaskMismatch - 设置为true时,仍然会接受未按照标准正确屏蔽的帧。
protected void decode(ChannelHandlerContext ctx, ByteBuf in, java.util.List<java.lang.Object> out) throws java.lang.Exception
ByteToMessageDecoder
decode在课堂上
ByteToMessageDecoder
ctx - 这ByteToMessageDecoder所属的ChannelHandlerContext
in - 从中读取数据的ByteBuf
out - 应该添加解码消息的
List
java.lang.Exception - 发生错误时抛出
protected void checkCloseFrameBody(ChannelHandlerContext ctx, ByteBuf buffer)
Copyright © 2008–2018 The Netty Project. All rights reserved.