Home / Class/ WebSocketClientHandshaker13 Class — netty Architecture

WebSocketClientHandshaker13 Class — netty Architecture

Architecture documentation for the WebSocketClientHandshaker13 class in WebSocketClientHandshaker13.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  5ffea847_3861_46b7_67d3_8bb6f2492be7["WebSocketClientHandshaker13"]
  b26de2e3_7bc8_ec57_f2c9_2d6b322d0cb8["WebSocketClientHandshaker13.java"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|defined in| b26de2e3_7bc8_ec57_f2c9_2d6b322d0cb8
  025ffbc0_ece1_6db1_2592_b7d8e6a219de["WebSocketClientHandshaker13()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| 025ffbc0_ece1_6db1_2592_b7d8e6a219de
  ec0b7571_158c_d3a6_ced4_701f34c16074["FullHttpRequest()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| ec0b7571_158c_d3a6_ced4_701f34c16074
  f00b494b_3795_8488_2284_cf58aa45c72f["verify()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| f00b494b_3795_8488_2284_cf58aa45c72f
  8882e620_9df6_8ad7_bf65_ee82b135a791["WebSocketFrameDecoder()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| 8882e620_9df6_8ad7_bf65_ee82b135a791
  9641b011_13c1_ff84_709d_054a2ca22b0c["WebSocketFrameEncoder()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| 9641b011_13c1_ff84_709d_054a2ca22b0c
  4f4f789b_6da4_ce57_fef4_d0219ebcb18f["isAllowExtensions()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| 4f4f789b_6da4_ce57_fef4_d0219ebcb18f
  dc96469e_9fe3_702d_c128_b20ef57c8f26["isPerformMasking()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| dc96469e_9fe3_702d_c128_b20ef57c8f26
  4a9adb40_fc1d_1465_ea11_40f0cc872998["isAllowMaskMismatch()"]
  5ffea847_3861_46b7_67d3_8bb6f2492be7 -->|method| 4a9adb40_fc1d_1465_ea11_40f0cc872998

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker13.java lines 41–360

public class WebSocketClientHandshaker13 extends WebSocketClientHandshaker {

    private static final InternalLogger logger = InternalLoggerFactory.getInstance(WebSocketClientHandshaker13.class);

    public static final String MAGIC_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";

    private String expectedChallengeResponseString;

    private final boolean allowExtensions;
    private final boolean performMasking;
    private final boolean allowMaskMismatch;

    /**
     * Creates a new instance.
     *
     * @param webSocketURL
     *            URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be
     *            sent to this URL.
     * @param version
     *            Version of web socket specification to use to connect to the server
     * @param subprotocol
     *            Sub protocol request sent to the server.
     * @param allowExtensions
     *            Allow extensions to be used in the reserved bits of the web socket frame
     * @param customHeaders
     *            Map of custom headers to add to the client request
     * @param maxFramePayloadLength
     *            Maximum length of a frame's payload
     */
    public WebSocketClientHandshaker13(URI webSocketURL, WebSocketVersion version, String subprotocol,
                                       boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) {
        this(webSocketURL, version, subprotocol, allowExtensions, customHeaders, maxFramePayloadLength,
                true, false);
    }

    /**
     * Creates a new instance.
     *
     * @param webSocketURL
     *            URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be
     *            sent to this URL.
     * @param version
     *            Version of web socket specification to use to connect to the server
     * @param subprotocol
     *            Sub protocol request sent to the server.
     * @param allowExtensions
     *            Allow extensions to be used in the reserved bits of the web socket frame
     * @param customHeaders
     *            Map of custom headers to add to the client request
     * @param maxFramePayloadLength
     *            Maximum length of a frame's payload
     * @param performMasking
     *            Whether to mask all written websocket frames. This must be set to true in order to be fully compatible
     *            with the websocket specifications. Client applications that communicate with a non-standard server
     *            which doesn't require masking might set this to false to achieve a higher performance.
     * @param allowMaskMismatch
     *            When set to true, frames which are not masked properly according to the standard will still be
     *            accepted.
     */
    public WebSocketClientHandshaker13(URI webSocketURL, WebSocketVersion version, String subprotocol,
            boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength,
            boolean performMasking, boolean allowMaskMismatch) {
        this(webSocketURL, version, subprotocol, allowExtensions, customHeaders, maxFramePayloadLength,
                performMasking, allowMaskMismatch, DEFAULT_FORCE_CLOSE_TIMEOUT_MILLIS);
    }

    /**
     * Creates a new instance.
     *
     * @param webSocketURL
     *            URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web socket frames will be
     *            sent to this URL.
     * @param version
     *            Version of web socket specification to use to connect to the server
     * @param subprotocol
     *            Sub protocol request sent to the server.
     * @param allowExtensions
     *            Allow extensions to be used in the reserved bits of the web socket frame
     * @param customHeaders
     *            Map of custom headers to add to the client request
     * @param maxFramePayloadLength

Frequently Asked Questions

What is the WebSocketClientHandshaker13 class?
WebSocketClientHandshaker13 is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker13.java.
Where is WebSocketClientHandshaker13 defined?
WebSocketClientHandshaker13 is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker13.java at line 41.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free