WebSocketServerHandshaker07 Class — netty Architecture
Architecture documentation for the WebSocketServerHandshaker07 class in WebSocketServerHandshaker07.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD 2c62a90c_a2f8_18d2_e63d_025dd7bc93a4["WebSocketServerHandshaker07"] 05c1ca2a_d7d3_2749_9a57_704ae7659457["WebSocketServerHandshaker07.java"] 2c62a90c_a2f8_18d2_e63d_025dd7bc93a4 -->|defined in| 05c1ca2a_d7d3_2749_9a57_704ae7659457 f16d8a54_2833_e6f4_a231_a486046297d5["WebSocketServerHandshaker07()"] 2c62a90c_a2f8_18d2_e63d_025dd7bc93a4 -->|method| f16d8a54_2833_e6f4_a231_a486046297d5 e544e828_6988_0f6b_4532_e2e51b3a2f0d["FullHttpResponse()"] 2c62a90c_a2f8_18d2_e63d_025dd7bc93a4 -->|method| e544e828_6988_0f6b_4532_e2e51b3a2f0d d6c24c65_c563_f8a7_90d5_e9e6beefcdb6["WebSocketFrameDecoder()"] 2c62a90c_a2f8_18d2_e63d_025dd7bc93a4 -->|method| d6c24c65_c563_f8a7_90d5_e9e6beefcdb6 e503b155_cd40_e82e_3224_8f75a7524e60["WebSocketFrameEncoder()"] 2c62a90c_a2f8_18d2_e63d_025dd7bc93a4 -->|method| e503b155_cd40_e82e_3224_8f75a7524e60
Relationship Graph
Source Code
codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker07.java lines 38–186
public class WebSocketServerHandshaker07 extends WebSocketServerHandshaker {
public static final String WEBSOCKET_07_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 WebSocketServerHandshaker07(
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 WebSocketServerHandshaker07(
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 decoderConfig
* Frames decoder configuration.
*/
public WebSocketServerHandshaker07(String webSocketURL, String subprotocols, WebSocketDecoderConfig decoderConfig) {
super(WebSocketVersion.V07, 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-07">HyBi version 7</a>.
* </p>
*
* <p>
* Browser request to the server:
* </p>
*
* <pre>
* GET /chat HTTP/1.1
* Host: server.example.com
* Upgrade: websocket
* Connection: Upgrade
* Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
* Sec-WebSocket-Origin: http://example.com
* Sec-WebSocket-Protocol: chat, superchat
* Sec-WebSocket-Version: 7
* </pre>
*
Defined In
Source
Frequently Asked Questions
What is the WebSocketServerHandshaker07 class?
WebSocketServerHandshaker07 is a class in the netty codebase, defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker07.java.
Where is WebSocketServerHandshaker07 defined?
WebSocketServerHandshaker07 is defined in codec-http/src/main/java/io/netty/handler/codec/http/websocketx/WebSocketServerHandshaker07.java at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free