Home / Class/ WebSocketServerHandshaker13 Class — netty Architecture

WebSocketServerHandshaker13 Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  5215fe90_7a02_a4cb_af67_a3e5f8d6ec14["WebSocketServerHandshaker13"]
  c36e2a54_f17c_16f8_5d41_6c1035af1fbf["WebSocketServerHandshaker13.java"]
  5215fe90_7a02_a4cb_af67_a3e5f8d6ec14 -->|defined in| c36e2a54_f17c_16f8_5d41_6c1035af1fbf
  cd4a9f79_6c28_0f97_4b38_45c1baf3cc11["WebSocketServerHandshaker13()"]
  5215fe90_7a02_a4cb_af67_a3e5f8d6ec14 -->|method| cd4a9f79_6c28_0f97_4b38_45c1baf3cc11
  dfefc2e4_7319_4560_00c4_f148515b859b["FullHttpResponse()"]
  5215fe90_7a02_a4cb_af67_a3e5f8d6ec14 -->|method| dfefc2e4_7319_4560_00c4_f148515b859b
  424bace1_e792_cfe4_1fd8_213be947e31d["WebSocketFrameDecoder()"]
  5215fe90_7a02_a4cb_af67_a3e5f8d6ec14 -->|method| 424bace1_e792_cfe4_1fd8_213be947e31d
  fa26fa7a_022a_f731_cacf_19c42d1e9dd8["WebSocketFrameEncoder()"]
  5215fe90_7a02_a4cb_af67_a3e5f8d6ec14 -->|method| fa26fa7a_022a_f731_cacf_19c42d1e9dd8

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker13.java lines 37–202

public class WebSocketServerHandshaker13 extends WebSocketServerHandshaker {

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

    /**
     * Constructor specifying the destination web socket location
     *
     * @param webSocketURL
     *        URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web
     *        socket frames will be sent to this URL.
     * @param subprotocols
     *        CSV of supported protocols
     * @param allowExtensions
     *        Allow extensions to be used in the reserved bits of the web socket frame
     * @param maxFramePayloadLength
     *        Maximum allowable frame payload length. Setting this value to your application's
     *        requirement may reduce denial of service attacks using long data frames.
     */
    public WebSocketServerHandshaker13(
            String webSocketURL, String subprotocols, boolean allowExtensions, int maxFramePayloadLength) {
        this(webSocketURL, subprotocols, allowExtensions, maxFramePayloadLength, false);
    }

    /**
     * Constructor specifying the destination web socket location
     *
     * @param webSocketURL
     *        URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web
     *        socket frames will be sent to this URL.
     * @param subprotocols
     *        CSV of supported protocols
     * @param allowExtensions
     *        Allow extensions to be used in the reserved bits of the web socket frame
     * @param maxFramePayloadLength
     *        Maximum allowable frame payload length. Setting this value to your application's
     *        requirement may reduce denial of service attacks using long data frames.
     * @param allowMaskMismatch
     *            When set to true, frames which are not masked properly according to the standard will still be
     *            accepted.
     */
    public WebSocketServerHandshaker13(
            String webSocketURL, String subprotocols, boolean allowExtensions, int maxFramePayloadLength,
            boolean allowMaskMismatch) {
        this(webSocketURL, subprotocols, WebSocketDecoderConfig.newBuilder()
            .allowExtensions(allowExtensions)
            .maxFramePayloadLength(maxFramePayloadLength)
            .allowMaskMismatch(allowMaskMismatch)
            .build());
    }

    /**
     * Constructor specifying the destination web socket location
     *
     * @param webSocketURL
     *        URL for web socket communications. e.g "ws://myhost.com/mypath". Subsequent web
     *        socket frames will be sent to this URL.
     * @param subprotocols
     *        CSV of supported protocols
     * @param decoderConfig
     *            Frames decoder configuration.
     */
    public WebSocketServerHandshaker13(
            String webSocketURL, String subprotocols, WebSocketDecoderConfig decoderConfig) {
        super(WebSocketVersion.V13, webSocketURL, subprotocols, decoderConfig);
    }

    /**
     * <p>
     * Handle the web socket handshake for the web socket specification <a href=
     * "https://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-17">HyBi versions 13-17</a>. Versions 13-17
     * share the same wire protocol.
     * </p>
     *
     * <p>
     * Browser request to the server:
     * </p>
     *
     * <pre>
     * GET /chat HTTP/1.1
     * Host: server.example.com
     * Upgrade: websocket

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free