Home / Class/ WebSocketServerHandshaker08 Class — netty Architecture

WebSocketServerHandshaker08 Class — netty Architecture

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

Entity Profile

Dependency Diagram

graph TD
  f744aa36_e83b_c1d5_128a_5b925f5be96a["WebSocketServerHandshaker08"]
  5fc2fece_4b81_794f_69c8_251cfe0938c8["WebSocketServerHandshaker08.java"]
  f744aa36_e83b_c1d5_128a_5b925f5be96a -->|defined in| 5fc2fece_4b81_794f_69c8_251cfe0938c8
  573ebeba_c7f3_f65d_d62c_b0be1434d4ef["WebSocketServerHandshaker08()"]
  f744aa36_e83b_c1d5_128a_5b925f5be96a -->|method| 573ebeba_c7f3_f65d_d62c_b0be1434d4ef
  98ba87f0_d4d2_d44e_132d_56f05ae00c70["FullHttpResponse()"]
  f744aa36_e83b_c1d5_128a_5b925f5be96a -->|method| 98ba87f0_d4d2_d44e_132d_56f05ae00c70
  45a350e9_4b0d_299b_c082_ba6b1d144086["WebSocketFrameDecoder()"]
  f744aa36_e83b_c1d5_128a_5b925f5be96a -->|method| 45a350e9_4b0d_299b_c082_ba6b1d144086
  cf9f22f8_cfcf_d359_8f15_334d907c4ddd["WebSocketFrameEncoder()"]
  f744aa36_e83b_c1d5_128a_5b925f5be96a -->|method| cf9f22f8_cfcf_d359_8f15_334d907c4ddd

Relationship Graph

Source Code

codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker08.java lines 38–192

public class WebSocketServerHandshaker08 extends WebSocketServerHandshaker {

    public static final String WEBSOCKET_08_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 WebSocketServerHandshaker08(
            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 WebSocketServerHandshaker08(
            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 WebSocketServerHandshaker08(
        String webSocketURL, String subprotocols, WebSocketDecoderConfig decoderConfig) {
        super(WebSocketVersion.V08, 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-08">HyBi version 8 to 10</a>. Version 8, 9 and
     * 10 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 WebSocketServerHandshaker08 class?
WebSocketServerHandshaker08 is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker08.java.
Where is WebSocketServerHandshaker08 defined?
WebSocketServerHandshaker08 is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker08.java at line 38.

Analyze Your Own Codebase

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

Try Supermodel Free