Class WebSocketDecoderConfig

java.lang.Object
io.netty.handler.codec.http.websocketx.WebSocketDecoderConfig

public final class WebSocketDecoderConfig extends Object
Frames decoder configuration.
  • Field Details

    • DEFAULT

      static final WebSocketDecoderConfig 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 not
      closeOnProtocolViolation - 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

      public String toString()
      Overrides:
      toString in class Object
    • toBuilder

      public WebSocketDecoderConfig.Builder toBuilder()
    • newBuilder

      public static WebSocketDecoderConfig.Builder newBuilder()