public class WebSocketServerHandshakerFactory extends Object
WebSocketServerHandshaker
.Constructor and Description |
---|
WebSocketServerHandshakerFactory(String webSocketURL,
String subprotocols,
boolean allowExtensions)
Constructor specifying the destination web socket location
|
WebSocketServerHandshakerFactory(String webSocketURL,
String subprotocols,
boolean allowExtensions,
int maxFramePayloadLength)
Constructor specifying the destination web socket location
|
WebSocketServerHandshakerFactory(String webSocketURL,
String subprotocols,
boolean allowExtensions,
int maxFramePayloadLength,
boolean allowMaskMismatch)
Constructor specifying the destination web socket location
|
Modifier and Type | Method and Description |
---|---|
WebSocketServerHandshaker |
newHandshaker(HttpRequest req)
Instances a new handshaker
|
static ChannelFuture |
sendUnsupportedVersionResponse(Channel channel)
Return that we need cannot not support the web socket version
|
static ChannelFuture |
sendUnsupportedVersionResponse(Channel channel,
ChannelPromise promise)
Return that we need cannot not support the web socket version
|
static void |
sendUnsupportedWebSocketVersionResponse(Channel channel)
Deprecated.
|
public WebSocketServerHandshakerFactory(String webSocketURL, String subprotocols, boolean allowExtensions)
webSocketURL
- URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL.subprotocols
- CSV of supported protocols. Null if sub protocols not supported.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framepublic WebSocketServerHandshakerFactory(String webSocketURL, String subprotocols, boolean allowExtensions, int maxFramePayloadLength)
webSocketURL
- URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL.subprotocols
- CSV of supported protocols. Null if sub protocols not supported.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framemaxFramePayloadLength
- Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames.public WebSocketServerHandshakerFactory(String webSocketURL, String subprotocols, boolean allowExtensions, int maxFramePayloadLength, boolean allowMaskMismatch)
webSocketURL
- URL for web socket communications. e.g "ws://myhost.com/mypath".
Subsequent web socket frames will be sent to this URL.subprotocols
- CSV of supported protocols. Null if sub protocols not supported.allowExtensions
- Allow extensions to be used in the reserved bits of the web socket framemaxFramePayloadLength
- Maximum allowable frame payload length. Setting this value to your application's
requirement may reduce denial of service attacks using long data frames.allowMaskMismatch
- When set to true, frames which are not masked properly according to the standard will still be
accepted.public WebSocketServerHandshaker newHandshaker(HttpRequest req)
@Deprecated public static void sendUnsupportedWebSocketVersionResponse(Channel channel)
sendUnsupportedVersionResponse(Channel)
public static ChannelFuture sendUnsupportedVersionResponse(Channel channel)
public static ChannelFuture sendUnsupportedVersionResponse(Channel channel, ChannelPromise promise)
Copyright © 2008–2017 The Netty Project. All rights reserved.