Performs server side opening and closing handshakes for web socket specification version draft-ietf-hybi-thewebsocketprotocol- 10
| Modifier and Type | Field and Description |
|---|---|
| public static final String |
| Access | Constructor and Description |
|---|---|
| public | WebSocketServerHandshaker07(String
URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL. webSocketURL, String CSV of supported protocols subprotocols, boolean Allow extensions to be used in the reserved bits of the web socket frame allowExtensions, int Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames. maxFramePayloadLength)Constructor specifying the destination web socket location |
| public | WebSocketServerHandshaker07(String
URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL. webSocketURL, String CSV of supported protocols subprotocols, boolean Allow extensions to be used in the reserved bits of the web socket frame allowExtensions, int Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames. maxFramePayloadLength, boolean When set to true, frames which are not masked properly according to the standard will still be
accepted. allowMaskMismatch)Constructor specifying the destination web socket location |
| public | WebSocketServerHandshaker07(String webSocketURL, String subprotocols, WebSocketDecoderConfig
Frames decoder configuration. decoderConfig)Constructor specifying the destination web socket location |
| Modifier and Type | Method and Description |
|---|---|
| protected FullHttpResponse | newHandshakeResponse(FullHttpRequest req, HttpHeaders headers)
Implements abstract io. Handle the web socket handshake for the web socket specification HyBi version 7. |
| protected WebSocketFrameDecoder | newWebsocketDecoder()
Implements abstract io. |
| protected WebSocketFrameEncoder | newWebSocketEncoder()
Implements abstract io. |
| WEBSOCKET_07_ACCEPT_GUID | back to summary |
|---|---|
| public static final String WEBSOCKET_07_ACCEPT_GUID | |
| WebSocketServerHandshaker07 | back to summary |
|---|---|
| public WebSocketServerHandshaker07(String webSocketURL, String subprotocols, boolean allowExtensions, int maxFramePayloadLength) Constructor specifying the destination web socket location
| |
| WebSocketServerHandshaker07 | back to summary |
|---|---|
| public WebSocketServerHandshaker07(String webSocketURL, String subprotocols, boolean allowExtensions, int maxFramePayloadLength, boolean allowMaskMismatch) Constructor specifying the destination web socket location
| |
| WebSocketServerHandshaker07 | back to summary |
|---|---|
| public WebSocketServerHandshaker07(String webSocketURL, String subprotocols, WebSocketDecoderConfig decoderConfig) Constructor specifying the destination web socket location
| |
| newHandshakeResponse | back to summary |
|---|---|
| protected FullHttpResponse newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) Implements abstract io. Handle the web socket handshake for the web socket specification HyBi version 7. Browser request to the server: 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 Server response: HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo= Sec-WebSocket-Protocol: chat
| |
| newWebsocketDecoder | back to summary |
|---|---|
| protected WebSocketFrameDecoder newWebsocketDecoder() Implements abstract io. Doc from io. Returns the decoder to use after handshake is complete.
| |
| newWebSocketEncoder | back to summary |
|---|---|
| protected WebSocketFrameEncoder newWebSocketEncoder() Implements abstract io. Doc from io. Returns the encoder to use after the handshake is complete.
| |