Class WebSocketDecoderConfig
java.lang.Object
io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig
Frames decoder configuration.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final boolean
private final boolean
(package private) static final WebSocketDecoderConfig
private final boolean
private final int
private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
WebSocketDecoderConfig
(int maxFramePayloadLength, boolean expectMaskedFrames, boolean allowMaskMismatch, boolean allowExtensions, boolean closeOnProtocolViolation, boolean withUTF8Validator) Constructor -
Method Summary
-
Field Details
-
DEFAULT
-
maxFramePayloadLength
private final int maxFramePayloadLength -
expectMaskedFrames
private final boolean expectMaskedFrames -
allowMaskMismatch
private final boolean allowMaskMismatch -
allowExtensions
private final boolean allowExtensions -
closeOnProtocolViolation
private final boolean closeOnProtocolViolation -
withUTF8Validator
private final boolean withUTF8Validator
-
-
Constructor Details
-
WebSocketDecoderConfig
private WebSocketDecoderConfig(int maxFramePayloadLength, boolean expectMaskedFrames, boolean allowMaskMismatch, boolean allowExtensions, boolean closeOnProtocolViolation, boolean withUTF8Validator) Constructor- Parameters:
maxFramePayloadLength
- Maximum length of a frame's payload. Setting this to an appropriate value for you application helps check for denial of services attacks.expectMaskedFrames
- Web socket servers must set this to true processed incoming masked payload. Client implementations must set this to false.allowMaskMismatch
- Allows to loosen the masking requirement on received frames. When this is set to false then also frames which are not masked properly according to the standard will still be accepted.allowExtensions
- Flag to allow reserved extension bits to be used or notcloseOnProtocolViolation
- Flag to send close frame immediately on any protocol violation.ion.withUTF8Validator
- Allows you to avoid adding of Utf8FrameValidator to the pipeline on the WebSocketServerProtocolHandler creation. This is useful (less overhead) when you use only BinaryWebSocketFrame within your web socket connection.
-
-
Method Details
-
maxFramePayloadLength
public int maxFramePayloadLength() -
expectMaskedFrames
public boolean expectMaskedFrames() -
allowMaskMismatch
public boolean allowMaskMismatch() -
allowExtensions
public boolean allowExtensions() -
closeOnProtocolViolation
public boolean closeOnProtocolViolation() -
withUTF8Validator
public boolean withUTF8Validator() -
toString
-
toBuilder
-
newBuilder
-